GHSA-53G2-MVCC-Q9X3

GHSA-53G2-MVCC-Q9X3 is a medium-severity cross-site scripting (XSS) vulnerability in trix (npm), affecting versions < 2.1.18. It is fixed in 2.1.18.

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

Trix: Stored XSS via HTMLParser attribute injection on paste

References

The vulnerability was responsibly reported by HackerOne researcher newbiefromcoma.

Impact

The Trix editor, in versions prior to 2.1.18, is vulnerable to XSS when crafted HTML is pasted into the editor. The HTMLParser processed a mock attachment, a <span> carrying an empty data-trix-attachment="{}". The empty attachment object caused the element to bypass attachment handling, so its data-trix-attributes were applied to a plain string piece. The pre-2.1.18 StringPiece.fromJSON accepted the href without validation, so an attacker-supplied javascript: URI was carried into the document model and emitted verbatim into the serialized HTML, executing when the content was rendered and clicked.

This is a stored XSS in any application that accepts untrusted rich text through Trix and renders the serialized output to other users. Applications that apply server-side HTML sanitization, such as the Rails built-in sanitizer, are additionally protected because the payload is neutralized on save.

This vulnerability shares its fix with GHSA-53p3-c7vp-4mcc. Both are resolved by the StringPiece.fromJSON sanitization added in 2.1.18. This advisory covers the paste and HTMLParser entry vector, while GHSA-53p3-c7vp-4mcc covers the drag-and-drop path through the fallback Level0InputController.

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-53G2-MVCC-Q9X3 has a CVSS score of 4.6 (Medium). The vector is network-reachable, low 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 (2.1.18); upgrading removes the vulnerable code path.

Affected versions

trix (< 2.1.18) action_text-trix (< 2.1.18)

Security releases

trix → 2.1.18 (npm) action_text-trix → 2.1.18 (rubygems)

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

Users should upgrade to Trix editor version 2.1.18 or later.

Frequently Asked Questions

  1. What is GHSA-53G2-MVCC-Q9X3? GHSA-53G2-MVCC-Q9X3 is a medium-severity cross-site scripting (XSS) vulnerability in trix (npm), affecting versions < 2.1.18. It is fixed in 2.1.18. Untrusted input is rendered as active markup in a victim's browser, which can run script in their session.
  2. How severe is GHSA-53G2-MVCC-Q9X3? GHSA-53G2-MVCC-Q9X3 has a CVSS score of 4.6 (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 packages are affected by GHSA-53G2-MVCC-Q9X3?
    • trix (npm) (versions < 2.1.18)
    • action_text-trix (rubygems) (versions < 2.1.18)
  4. Is there a fix for GHSA-53G2-MVCC-Q9X3? Yes. GHSA-53G2-MVCC-Q9X3 is fixed in 2.1.18. Upgrade to this version or later.
  5. Is GHSA-53G2-MVCC-Q9X3 exploitable, and should I be worried? Whether GHSA-53G2-MVCC-Q9X3 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-53G2-MVCC-Q9X3 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-53G2-MVCC-Q9X3?
    • Upgrade trix to 2.1.18 or later
    • Upgrade action_text-trix to 2.1.18 or later

Other vulnerabilities in trix

Stop the waste.
Protect your environment with Kodem.