Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. league/commonmark
  4. ›
  5. CVE-2026-33347

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

March 19, 2026 (updated March 20, 2026)

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.

References

  • github.com/advisories/GHSA-hh8v-hgvp-g3f5
  • github.com/thephpleague/commonmark
  • github.com/thephpleague/commonmark/security/advisories/GHSA-hh8v-hgvp-g3f5
  • nvd.nist.gov/vuln/detail/CVE-2026-33347

Code Behaviors & Features

Detect and mitigate CVE-2026-33347 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 2.3.0 before 2.8.2

Fixed versions

  • 2.8.2

Solution

Upgrade to version 2.8.2 or above.

Impact 7.2 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-185: Incorrect Regular Expression
  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
  • CWE-918: Server-Side Request Forgery (SSRF)

Source file

packagist/league/commonmark/CVE-2026-33347.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Tue, 24 Mar 2026 12:18:34 +0000.