CVE-2026-113787
odf-kit: HTML injection leading to XSS in odtToHtml() via unescaped style attribute values
Also known as GHSA-3cgg-c5pp-57h6
Mitigation
- Upgrade odf-kit to 0.14.2 or later.
Who should check
- Projects that depend on npm package odf-kit (>= 0.6.0, < 0.14.2)
- Anyone running GitHubNewbie0 odf-kit >= 0.6.0, < 0.14.2
Vulnerability facts
- Affected
- odf-kit >= 0.6.0, < 0.14.2
- Fixed in
- 0.14.2
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, no login needed
- CVSS
- 6.1 (v3.1, CNA)CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:NOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Privileges required: None
- User interaction: Required
- Scope: Changed (impact reaches other components)
- Confidentiality impact: Low
- Integrity impact: Low
- Availability impact: None
- EPSS
- 0.26% chance of exploitation in 30 days (percentile 11, 2026-11-26)
- CWE
- CWE-79
- Modified
Description
odf-kit allows users to generate, fill, read, and convert OpenDocument Format files (.odt, .ods) in TypeScript and JavaScript. Starting in version 0.6.0 and prior to version 0.14.2, he renderer has an `escapeHtml()` helper and applies it consistently to text content and to attribute values — `href`, `src`, `alt`, `id`, `data-author`, `data-date`, citation text all go through it. The inline CSS strings do not. In `renderTextSpan` (`dist/odt/to-html/html-renderer.js:195`), the value of e.g. `fo:color` is copied from the document into `style.fontColor` verbatim by the parser (`extractSpanStyle`, read/parser.js:348), then concatenated raw into the attribute. A `"` in the value terminates the attribute early. The same unescaped `style="${...}"` pattern appears at roughly ten other emission sites: paragraph and heading (`paragraphStyleToCss`), table cells and rows (`cellStyleToCss`, `rowStyleToCss`), `<col>`, and the image style attribute. The affected source attributes include `fo:color`, `fo:background-color`, `fo:text-shadow`, `fo:letter-spacing`, `fo:font-family` (via both direct and font-face resolution), `fo:margin-*`, `fo:padding-*`, `fo:line-height`, `fo:border*`, and `style:vertical-align`. Version 0.14.2 contains a patch.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| npm odf-kit | >= 0.6.0, < 0.14.2 | 0.14.2 | osv |
| GitHubNewbie0 odf-kit | >= 0.6.0, < 0.14.2 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2026-113787. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2026-113787.md Affected: odf-kit >= 0.6.0, < 0.14.2 Fixed in: 0.14.2 Steps: 1. Search this machine and project for odf-kit (npm), GitHubNewbie0 odf-kit: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
FAQ
Is CVE-2026-113787 being exploited?
There is no confirmed exploitation: CVE-2026-113787 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.26% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2026-113787?
Medium: CVSS 6.1 (v3.1, scored by CNA). Remote, no login needed. A user has to take an action, such as opening a link, for the attack to work.
Which versions are affected by CVE-2026-113787?
odf-kit >= 0.6.0, < 0.14.2.
Is there a fix for CVE-2026-113787?
Yes. Fixed in 0.14.2. Upgrade odf-kit to 0.14.2 or later.
How do I check if I'm affected by CVE-2026-113787?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.