Read the docs

HTML injection leading to XSS in odf-kit odtToHtml()

Priority MEDIUM 60CWE-79Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
Required
Attack complexity
Low
Impact type
Cross-site scripting
Confidentiality · integrity · availability
Low · Low · None
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-79.

Summary

odf-kit versions from 0.6.0 before 0.14.2 do not escape values of inline CSS style attributes when rendering ODT documents to HTML. A crafted style value such as a font color containing a double quote ends the attribute early, which causes HTML injection and cross-site scripting (CWE-79). An unauthenticated remote attacker needs a victim to view or open a crafted document, and the attack requires user interaction.

Written with Claude Haiku 5.5 from the sources below · 2026-11-04

Description from the CNA

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.

Why it matters now

Exploitation Proof of concept CISA SSVC · not in CISA KEV
EPSS 0.00246 15th percentileScored 2026-11-08
Fix Fixed odf-kit (GitHubNewbie0): 0.14.2odf-kit (npm): 0.14.2

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
Poc
Automatable
No
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
GitHubNewbie0odf-kit0.6.0 to before 0.14.20.14.2Patch availableCNA
—odf-kit (npm)0.6.0 to before 0.14.20.14.2Patch availableGHSA-3cgg-c5pp-57h6
  • odf-kit VendorGitHubNewbie0 Affected 0.6.0 to before 0.14.2 Fixed in 0.14.2 Patch available CNA
  • odf-kit (npm) Vendor— Affected 0.6.0 to before 0.14.2 Fixed in 0.14.2 Patch available GHSA-3cgg-c5pp-57h6

Remediation

Update odf-kit to version 0.14.2, which escapes the style attribute values.

Written with Claude Haiku 5.5 from the sources below · 2026-11-04

  • Fix · CNA odf-kit (GitHubNewbie0) Fixed in 0.14.2
  • Fix · GHSA-3cgg-c5pp-57h6 odf-kit (npm) Fixed in 0.14.2 Advisory →

Timeline

  1. 2026-10-21 Threatist record created from CVE-2026-113787
  2. 2026-10-21 Affected versions changed · CNA
  3. 2026-10-23 Priority changed: MEDIUM → LOW
  4. 2026-10-30 CISA SSVC decision points changed
  5. 2026-10-30 Priority changed: LOW → MEDIUM
  6. 2026-11-04 Alias added: GHSA-3cgg-c5pp-57h6
  7. 2026-11-04 Fix available: npm/[email protected] · GHSA-3cgg-c5pp-57h6
  8. 2026-11-04 CVSS score added · GHSA-3cgg-c5pp-57h6
  9. 2026-11-04 Weakness changed · GHSA-3cgg-c5pp-57h6
  10. 2026-11-04 5 new references · GHSA-3cgg-c5pp-57h6

References

Sources