{"id":"CVE-2026-113787","kind":"vulnerability","aliases":["CVE-2026-113787"],"related":[],"title":"odf-kit: unescaped CSS values in HTML output allow attribute injection","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.","summary":"odf-kit's ODT-to-HTML renderer escapes text and most attributes but copies style values such as fo:color and fo:font-family into inline style attributes without escaping. A crafted document with a double quote in one of these values can break out of the attribute and inject HTML.","severity":"medium","cvss":6.1,"epss":0.00206,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["document-processing","node","odf-kit","package","typescript"],"not_affected_if":["no-html-rendering","trusted-documents-only"],"how_to_check":"- Run `npm ls odf-kit` to find the installed version and any projects depending on it.\n- Search your code for imports of `odf-kit` that call the HTML renderer on documents from users or other untrusted sources.","fix":"- Upgrade `odf-kit` to `0.14.2` or later.\n- Until upgraded, do not render untrusted .odt files to HTML, or sanitize the generated HTML before inserting it into a page.","status":"open","published_at":"2026-10-21T16:17:26+00:00","first_seen_at":"2026-10-23T21:57:29+00:00","triaged_at":"2026-10-25T04:03:27+00:00","updated_at":"2026-10-25T04:03:27+00:00","category":"package","confidence":0.7,"triage":{"at":"2026-10-25T04:03:27Z","model":"claude-haiku-5-5","output":{"fix":"- Upgrade `odf-kit` to `0.14.2` or later.\n- Until upgraded, do not render untrusted .odt files to HTML, or sanitize the generated HTML before inserting it into a page.","reach":"unknown","title":"odf-kit: unescaped CSS values in HTML output allow attribute injection","impact":"medium","summary":"odf-kit's ODT-to-HTML renderer escapes text and most attributes but copies style values such as fo:color and fo:font-family into inline style attributes without escaping. A crafted document with a double quote in one of these values can break out of the attribute and inject HTML.","category":"package","nicknames":[],"who_cares":["node","typescript","odf-kit","document-processing"],"confidence":0.7,"needs_auth":"unknown","worst_case":"attacker injects HTML into rendered page, possibly enabling cross-site scripting","analyst_note":"","how_to_check":"- Run `npm ls odf-kit` to find the installed version and any projects depending on it.\n- Search your code for imports of `odf-kit` that call the HTML renderer on documents from users or other untrusted sources.","needs_analyst":false,"not_affected_if":["no-html-rendering","trusted-documents-only"],"who_is_affected":"Applications that use odf-kit's ODT-to-HTML rendering on OpenDocument files from users or external sources are exposed, since the injected markup comes from the document's own style properties. Projects that only generate or fill ODF files, or that never render to HTML, are not affected by this flaw. Teams that render only their own trusted documents face much lower risk.","user_interaction":"yes","needs_special_setup":"no","severity_if_unknown":"medium"},"cost_usd":0.00067,"input_tokens":3768,"output_tokens":587,"severity_before":"medium"},"analyst_status":null,"analyst_note":null,"search":"'-113787':15A,18A '-2026':14A,17A '0.14.2':110C,262C '0.6.0':105C '195':153C '348':173C 'affect':216C 'align':260C 'allow':10A,85C 'alt':130C 'appear':193C 'appli':118C 'attribut':11A,41B,58B,78B,126C,179C,186C,214C,218C 'author':134C 'background':224C 'background-color':223C 'border':255C 'break':74B 'cell':205C 'cellstyletocss':208C 'citat':138C 'color':49B,159C,221C,225C 'concaten':175C 'consist':120C 'contain':263C 'content':123C 'convert':92C 'copi':43B,161C 'craft':62B 'css':5A,146C 'cve':13A,16A 'data':133C,136C 'data-author':132C 'data-d':135C 'date':137C 'direct':240C 'dist/odt/to-html/html-renderer.js':152C 'document':20B,63B,164C 'document-process':19B 'doubl':66B 'e.g':157C 'earli':187C 'emiss':198C 'escap':37B,60B 'escapehtml':115C 'extractspanstyl':171C 'face':244C 'famili':54B,237C 'file':95C 'fill':89C 'fo':48B,51B,158C,220C,222C,226C,230C,234C,246C,248C,250C,254C 'font':53B,236C,243C 'font-fac':242C 'font-famili':52B,235C 'format':94C 'generat':88C 'go':141C 'head':202C 'height':253C 'helper':116C 'href':128C 'html':8A,35B,81B 'id':131C 'imag':212C 'includ':219C 'inject':12A,80B 'inlin':56B,145C 'javascript':101C 'kit':3A,25B,30B,84C 'letter':232C 'letter-spac':231C 'line':252C 'line-height':251C 'margin':247C 'node':22B 'od':97C 'odf':2A,24B,29B,83C 'odf-kit':1A,23B,28B,82C 'odt':33B,96C 'odt-to-html':32B 'one':69B 'opendocu':93C 'output':9A 'packag':26B 'pad':249C 'paragraph':200C 'paragraphstyletocss':203C 'parser':170C 'patch':265C 'pattern':192C 'prior':107C 'process':21B 'quot':67B 'raw':176C 'read':90C 'read/parser.js':172C 'render':36B,112C 'rendertextspan':151C 'resolut':245C 'rough':195C 'row':207C 'rowstyletocss':209C 'shadow':229C 'site':199C 'sourc':217C 'space':233C 'src':129C 'start':102C 'string':147C 'style':44B,57B,191C,213C,257C 'style.fontcolor':166C 'tabl':204C 'ten':196C 'termin':184C 'text':38B,122C,139C,228C 'text-shadow':227C 'typescript':27B,99C 'unescap':4A,190C 'user':86C 'valu':6A,45B,72B,127C,155C,183C 'verbatim':167C 'version':104C,109C,261C 'vertic':259C 'vertical-align':258C 'via':238C 'without':59B","nicknames":[],"mitigations":[],"who_affected":"Applications that use odf-kit's ODT-to-HTML rendering on OpenDocument files from users or external sources are exposed, since the injected markup comes from the document's own style properties. Projects that only generate or fill ODF files, or that never render to HTML, are not affected by this flaw. Teams that render only their own trusted documents face much lower risk.","tier":"C","verified":{},"analyst_revisit_at":null,"first_public_at":"2026-10-21T16:17:26+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","cvss_by":"security-advisories@github.com","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-113787","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-113787","severity":null,"published_at":"2026-10-21T16:17:26+00:00","modified_at":"2026-10-22T17:29:28+00:00","first_seen_at":"2026-10-23T21:57:29+00:00","fetched_at":"2026-10-23T22:29:01+00:00","note":null},{"source":"epss","external_id":"CVE-2026-113787","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-113787","severity":null,"published_at":null,"modified_at":null,"first_seen_at":"2026-10-24T13:15:54+00:00","fetched_at":"2026-10-24T13:15:54+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}