CVE-2026-33347: league/commonmark has an embed extension allowed_domains bypass

Published Mar 19, 2026
·
Updated

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 alloweddomains to restrict domains when processing untrusted Markdown input is affected.

Patches

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

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

Other sources

league/commonmark is a PHP Markdown parser. From version 2.3.0 to before version 2.8.2, 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 issue has been patched in version 2.8.2.

MITRE

Affected Software

2 affected componentsFixes available
composer/league/commonmark>=2.3.0<=2.8.1
2.8.2
thephpleague commonmark>=2.3.0<2.8.2

Event History

Mar 19, 2026
Advisory Published
via GitHub·07:04 PM
Data Sourced
via GitHub·07:04 PM
DescriptionWeaknessAffected Software
Mar 24, 2026
CVE Published
via MITRE·07:26 PM
Data Sourced
via MITRE·07:26 PM
DescriptionWeakness
Data Sourced
via NVD·08:16 PM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-33347?

CVE-2026-33347 is considered a critical vulnerability due to its potential to allow bypassing the domain allowlist.

2

How do I fix CVE-2026-33347?

To fix CVE-2026-33347, upgrade the league/commonmark package to version 2.8.2 or later.

3

What is the impact of CVE-2026-33347?

The impact of CVE-2026-33347 allows attackers to exploit domain filtering mechanisms, potentially leading to unauthorized access.

4

Which versions of the affected software are vulnerable to CVE-2026-33347?

League/commonmark versions up to and including 2.8.1 are vulnerable to CVE-2026-33347.

5

What kind of attack does CVE-2026-33347 enable?

CVE-2026-33347 enables attackers to craft malicious domains that can exploit the allowlist bypass.

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