GHSA-2RQM-H6HV-G79V

GHSA-2RQM-H6HV-G79V is a medium-severity cross-site scripting (XSS) vulnerability in odf-kit (npm), affecting versions >= 0.9.8, < 0.14.2. It is fixed in 0.14.2.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

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

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 defect in the ODT renderer (odtToHtml()) is tracked as GHSA-3cgg-c5pp-57h6 (CVE-2026-113787).

Credit

Reported by @PethuKannan.

Impact

Any 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.

Untrusted input is rendered as active markup in a victim's browser, which can run script in their session. Typical impact: session or credential theft, and actions taken as the user.

GHSA-2RQM-H6HV-G79V has a CVSS score of 6.1 (Medium). The vector is network-reachable, no privileges required, and user interaction required. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (0.14.2); upgrading removes the vulnerable code path.

Affected versions

odf-kit (>= 0.9.8, < 0.14.2)

Security releases

odf-kit → 0.14.2 (npm)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

Fixed in 0.14.2. Both sites now route document-controlled values through a shared attribute-escaping helper:

  • 1424227: escape style attribute values in the ODS HTML renderer
  • aa64c73: the shared escapeAttr helper

Users should upgrade to 0.14.2 or later.

Frequently Asked Questions

  1. What is GHSA-2RQM-H6HV-G79V? GHSA-2RQM-H6HV-G79V is a medium-severity cross-site scripting (XSS) vulnerability in odf-kit (npm), affecting versions >= 0.9.8, < 0.14.2. It is fixed in 0.14.2. Untrusted input is rendered as active markup in a victim's browser, which can run script in their session.
  2. How severe is GHSA-2RQM-H6HV-G79V? GHSA-2RQM-H6HV-G79V has a CVSS score of 6.1 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of odf-kit are affected by GHSA-2RQM-H6HV-G79V? odf-kit (npm) versions >= 0.9.8, < 0.14.2 is affected.
  4. Is there a fix for GHSA-2RQM-H6HV-G79V? Yes. GHSA-2RQM-H6HV-G79V is fixed in 0.14.2. Upgrade to this version or later.
  5. Is GHSA-2RQM-H6HV-G79V exploitable, and should I be worried? Whether GHSA-2RQM-H6HV-G79V is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether GHSA-2RQM-H6HV-G79V is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix GHSA-2RQM-H6HV-G79V? Upgrade odf-kit to 0.14.2 or later.

Other vulnerabilities in odf-kit

Stop the waste.
Protect your environment with Kodem.