GHSA-2rqm-h6hv-g79v: XSS

Published Oct 23, 2026
·
Updated

Summary

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

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.

Patches

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.

Credit

Reported by @PethuKannan.

Affected Software

1 affected componentFixes available
npm/odf-kit>=0.9.8<0.14.2
0.14.2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/odf-kit to a version that resolves this vulnerability.

    Fixed in 0.14.2
  2. Upgrade

    Upgrade odf-kit to a version that resolves this vulnerability.

    Fixed in 0.14.2

Event History

Oct 23, 2026
Advisory Published
via GitHub·08:55 PM
Data Sourced
via GitHub·08:55 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Which deployments are exposed to script execution?

Deployments are exposed when they process attacker-controlled .ods files with odsToHtml() and insert the resulting output as HTML. The issue affects ODS-to-HTML rendering; the impact depends on rendered HTML being placed in a browser-consumed HTML context.

2

What must an attacker control to exploit this?

An attacker needs to supply a crafted .ods file containing a double quote in a document-controlled style value. Relevant inputs include cell formatting properties used to build inline CSS and the style:row-height value.

3

How can I determine whether my application is affected?

Check whether it uses odf-kit's odsToHtml() and accepts or processes ODS files from untrusted sources. Versions before 0.14.0 contain the affected emission sites, where cell styles or row heights are written into style attributes without HTML escaping.

4

What can be done while an upgrade is not available?

Do not render untrusted ODS files through odsToHtml() into HTML contexts. Treat generated HTML from untrusted documents as unsafe unless the relevant style-derived values are escaped before insertion.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203