{"id":"CVE-2026-134010","aliases":["CVE-2026-134010","GHSA-2rqm-h6hv-g79v"],"related":[],"kind":"vulnerability","state":"published","title":"odf-kit: HTML injection leads to XSS in odsToHtml() via unescaped style attribute values","summary":"odf-kit is a TypeScript and JavaScript library for working with OpenDocument Format files. In versions 0.9.8 through 0.14.1, the odsToHtml() renderer inserts document-controlled cell formatting and row height values into HTML style attributes without escaping them. An attacker can craft an ODS file that injects arbitrary HTML attributes or elements, allowing JavaScript execution in the host page's origin when an application inserts the converted output as HTML. This issue is fixed in version 0.14.2.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"odf-kit is a TypeScript and JavaScript library for working with OpenDocument Format files. In versions 0.9.8 through 0.14.1, the odsToHtml() renderer inserts document-controlled cell formatting and row height values into HTML style attributes without escaping them. An attacker can craft an ODS file that injects arbitrary HTML attributes or elements, allowing JavaScript execution in the host page's origin when an application inserts the converted output as HTML. This issue is fixed in version 0.14.2.","source":"cvelist"},{"lang":"en","text":"### 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.","format":"markdown","source":"ghsa"}],"published":"2026-10-23T20:55:31.000Z","modified":"2026-11-23T22:20:12.800Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"version":">= 0.9.8, < 0.14.2","status":"affected"}],"vendor":"GitHubNewbie0","product":"odf-kit","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0.9.8","status":"affected","fixed":"0.14.2"}],"ecosystem":"npm","package":"odf-kit","purl":"pkg:npm/odf-kit","source":"ghsa"}],"references":[{"url":"https://github.com/GitHubNewbie0/odf-kit/security/advisories/GHSA-2rqm-h6hv-g79v","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/GitHubNewbie0/odf-kit/commit/1424227d1ca2716a249b623d1456575ff0331dcc","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/GitHubNewbie0/odf-kit/commit/aa64c734ebd7e7be40e35fcda83b1144193c3da2","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/GitHubNewbie0/odf-kit","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-11-23T21:13:46.542Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-134010","url":"https://www.cve.org/CVERecord?id=CVE-2026-134010","licence":"CVE Terms of Use","modified":"2026-11-23T21:13:55.081Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-2rqm-h6hv-g79v","url":"https://github.com/advisories/GHSA-2rqm-h6hv-g79v","licence":"CC-BY-4.0","modified":"2026-11-23T19:11:25.339Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-134010","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-134010","licence":"Public domain","modified":"2026-11-23T22:20:12.800Z"}],"updatedAt":"2026-11-25T22:59:52.689Z","epss":{"score":0.0048,"percentile":0.43034,"date":"2026-12-01T12:00:22.000Z"}}