Skip to content

← Public intelligence

npm package

odf-kit

Open actionable advisories and recorded vendor fixes. This public package view has no inventory attached and cannot establish whether your deployment is affected. A vendor fix never resolves your finding; verify your installed version and the source guidance.

Open advisories

2 actionable advisories, newest first. Withdrawn advisories and news are excluded. Coverage is partial.

  1. Medium, CVSS 6.1npmPublished

    odf-kit: HTML injection leading to XSS in odtToHtml() and odsToHtml() via unescaped style attribute values

    CVE-2026-113787 · GHSA-3cgg-c5pp-57h6

    Affected
    • npm odf-kit >= 0.6.0, < 0.14.2
    Fixed in
    0.14.2· Vendor fix available
    Issue
    ODF style attribute values are interpolated into style="..." attributes without HTML-escaping in both of odf-kit's to-HTML renderers (odtToHtml and 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 .odt or .ods file wherever the rendered output is inserted as HTML, which is the documented purpose of both functions. Details ODT renderer (src/odt/to-html/html-renderer.ts) The 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…

    Recommended action: Upgrade to 0.14.2 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  2. Medium, CVSS 6.1npmAmendedPublished

    odf-kit has HTML injection leading to XSS in odsToHtml() via unescaped style attribute values

    GHSA-2rqm-h6hv-g79v

    Affected
    • npm odf-kit >= 0.9.8, < 0.14.2
    Fixed in
    0.14.2· Vendor fix available
    Issue
    ODF 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. Details Two 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: - 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. - Row height. row.height (from style:row-height) is emitted raw into the row element's style attribute. The same…

    Recommended action: Upgrade to 0.14.2 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.com (1)osv.dev (2)Source checked Evidence →