CVE-2026-33347

CVE-2026-33347 is a medium-severity cross-site scripting (XSS) vulnerability in league/commonmark (composer), affecting versions >= 2.3.0, <= 2.8.1. It is fixed in 2.8.2.

Summary

Workarounds

  • Disable the Embed extension, or restrict its use to trusted users
  • Provide your own domain-filtering implementation of EmbedAdapterInterface
  • Enable a Content Security Policy (CSP) and outbound firewall restrictions

Impact

The DomainFilteringAdapter in the Embed extension is vulnerable to an allowlist bypass due to a missing hostname boundary assertion in the domain-matching regex. An attacker-controlled domain like youtube.com.evil passes the allowlist check when youtube.com is an allowed domain.

This enables two attack vectors:

  • SSRF: The OscaroteroEmbedAdapter makes server-side HTTP requests to the embed URL via the embed/embed library. A bypassed domain filter causes the server to make outbound requests to an attacker-controlled host, potentially probing internal services or exfiltrating request metadata.
  • XSS: EmbedRenderer outputs the oEmbed response HTML directly into the page with no sanitization. An attacker controlling the bypassed domain can return arbitrary HTML/JavaScript in their oEmbed response, which is rendered verbatim.

Any application using the Embed extension and relying on allowed_domains to restrict domains when processing untrusted Markdown input is affected.

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.

Affected versions

league/commonmark (>= 2.3.0, <= 2.8.1)

Security releases

league/commonmark → 2.8.2 (composer)

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.

See it in your environment

Remediation advice

This has been patched in version 2.8.2. The fix replaces the regex-based domain check with explicit hostname parsing using parse_url(), ensuring exact domain and subdomain matching only.

Frequently Asked Questions

  1. What is CVE-2026-33347? CVE-2026-33347 is a medium-severity cross-site scripting (XSS) vulnerability in league/commonmark (composer), affecting versions >= 2.3.0, <= 2.8.1. It is fixed in 2.8.2. Untrusted input is rendered as active markup in a victim's browser, which can run script in their session.
  2. Which versions of league/commonmark are affected by CVE-2026-33347? league/commonmark (composer) versions >= 2.3.0, <= 2.8.1 is affected.
  3. Is there a fix for CVE-2026-33347? Yes. CVE-2026-33347 is fixed in 2.8.2. Upgrade to this version or later.
  4. Is CVE-2026-33347 exploitable, and should I be worried? Whether CVE-2026-33347 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
  5. What actually determines whether CVE-2026-33347 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.
  6. How do I fix CVE-2026-33347? Upgrade league/commonmark to 2.8.2 or later.

Other vulnerabilities in league/commonmark

Stop the waste.
Protect your environment with Kodem.