{"vuln_id":"CVE-2026-113787","aliases":[],"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.","published_at":"2026-10-21T16:17:26.270000Z","modified_at":"2026-10-30T18:17:21.960000Z","first_seen_at":"2026-11-23T21:06:31.509016Z","severity":"medium","severity_source":"nvd","cvss_score":6.1,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","cwe":["CWE-79"],"vendor":null,"product":null,"kev":{"is_kev":false,"date_added":null,"due_date":null,"ransomware":false},"epss":0.00246,"epss_percentile":0.15957,"nvd_status":"Awaiting Analysis","enriched_at":"2026-11-23T23:11:05.327599Z","links":{"nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-113787"},"matched_alias":null,"items":[{"id":16538,"source":{"id":"osv","name":"OSV.dev"},"title":"GHSA-2rqm-h6hv-g79v: odf-kit has HTML injection leading to XSS in odsToHtml() via unescaped style attribute values","summary":"odf-kit has HTML injection leading to XSS in odsToHtml() via unescaped style attribute values\n\n### Summary\n\nODF style values are interpolated into `style=\"...\"` attributes without HTML-escaping in odf-kit's ODS to-HTML renderer (`odsToHtml()`). A double-quote character inside an attacker-controlled style value breaks out of the attribute, allowing arbitrary HTML/attribute injection — and therefore script execution (XSS) — from a crafted `.ods` file wherever the rendered output is inserted as HTML, which is the documented purpose of the function.\n\n### Details\n\nTwo emission sites in `src/ods/to-html/html-renderer.ts` (before 0.14.0, `src/ods-reader/html-renderer.ts`) write document-controlled values into a `style` attribute without escaping:\n\n- **Cell style.** `buildInlineStyle()` assembles a CSS string from the cell's formatting properties (`fo:color`, `fo:font-size`, `fo:font-family`, `fo:background-color`, `fo:text-align`, etc.) with no escaping, and `renderCell` emits it raw as the cell's `style` attribute.\n- **Row height.** `row.height` (from `style:row-height`) is emitted raw into the row element's `style` attribute.\n\nThe same defect in the ODT renderer (`odtToHtml()`) is tracked as GHSA-3cgg-c5pp-57h6 (CVE-2026-113787).\n\n### Impact\n\nAny consumer that renders `odsToHtml()` output as HTML gets XSS from a crafted `.ods` file they convert: untrusted file → arbitrary tags and attributes → script execution in the host page with the page's origin.\n\n### Patches\n\nFixed in 0.14.2. Both sites now route document-controlled values through a shared attribute-escaping helper:\n\n- [`1424227`](https://github.com/GitHubNewbie0/odf-kit/commit/1424227d1ca2716a249b623d1456575ff0331dcc): escape style attribute values in the ODS HTML renderer\n- [`aa64c73`](https://github.com/GitHubNewbie0/odf-kit/commit/aa64c734ebd7e7be40e35fcda83b1144193c3da2): the shared `escapeAttr` helper\n\nUsers should upgrade to 0.14.2 or later.\n\n### Credit\n\nReported by @PethuKannan.\n\nAffected: npm:odf-kit\n\nFixed in: 0.14.2\n\nReferences:\nhttps://github.com/GitHubNewbie0/odf-kit/security/advisories/GHSA-2rqm-h6hv-g79v\nhttps://github.com/GitHubNewbie0/odf-kit/commit/1424227d1ca2716a249b623d1456575ff0331dcc\nhttps://github.com/GitHubNewbie0/odf-kit","url":"https://osv.dev/vulnerability/GHSA-2rqm-h6hv-g79v","published_at":"2026-10-23T20:55:31Z","updated_at":"2026-11-23T19:11:25.339672Z","fetched_at":"2026-11-23T21:06:31.109544Z","severity":"medium","cvss_score":6.1,"epss":0.00246,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"odf-kit","vuln_id":"CVE-2026-134010","vuln_ids":["CVE-2026-113787","CVE-2026-134010","GHSA-2RQM-H6HV-G79V","GHSA-3CGG-C5PP-57H6"],"tags":["osv","npm","fix-available"],"cluster_id":14577,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/16538","html":"https://vulnwatch.ve1ve2.com/item/16538"}}]}