Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. @dicebear/converter
  4. ›
  5. CVE-2026-33418

CVE-2026-33418: SVG Dimension Capping Bypass via XML Comment Injection in @dicebear/converter ensureSize()

March 20, 2026

The ensureSize() function in @dicebear/converter used a regex-based approach to rewrite SVG width/height attributes, capping them at 2048px to prevent denial of service. This size capping could be bypassed by crafting SVG input that causes the regex to match a non-functional occurrence of <svg before the actual SVG root element. When the SVG is subsequently rendered via @resvg/resvg-js on the Node.js code path, it renders at the attacker-specified dimensions, potentially causing out-of-memory crashes.

References

  • github.com/advisories/GHSA-7j2x-32w6-p43p
  • github.com/dicebear/dicebear
  • github.com/dicebear/dicebear/security/advisories/GHSA-7j2x-32w6-p43p
  • nvd.nist.gov/vuln/detail/CVE-2026-33418

Code Behaviors & Features

Detect and mitigate CVE-2026-33418 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 before 9.4.2

Fixed versions

  • 9.4.2

Solution

Upgrade to version 9.4.2 or above.

Impact 7.5 HIGH

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

Learn more about CVSS

Weakness

  • CWE-185: Incorrect Regular Expression

Source file

npm/@dicebear/converter/CVE-2026-33418.yml

Spotted a mistake? Edit the file on GitLab.

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

Page generated Tue, 24 Mar 2026 12:17:15 +0000.