CVE-2026-29112: @dicebear/converter Uncontrolled Memory Allocation Vulnerability

HIGH
Advisory Identifier: GHSA-v3r3-4qgc-vw66
CVSS 7.5
CWE-770
Published
Advisory Summary

CVE-2026-29112 is a HIGH (CVSS 7.5) uncontrolled memory allocation vulnerability (CWE-770: Allocation of Resources Without Limits or Throttling) affecting @dicebear/converter libraries in the npm ecosystem. The issue involves uncontrolled memory allocation via crafted svg dimensions in @dicebear/converter. Remediation is available by upgrading affected packages to version 9.4.0.

CVE-2026-29112 at a Glance

CVE Identifier CVE-2026-29112
GHSA Identifier GHSA-v3r3-4qgc-vw66
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-770: Allocation of Resources Without Limits or Throttling
Affected Product @dicebear/converter
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2026-29112

To remediate this vulnerability, upgrade all affected @dicebear/converter dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@dicebear/converter fixed: 9.4.0
npm install @dicebear/converter@9.4.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @dicebear/converter

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-29112, inspect your project dependencies using npm:

npm ls @dicebear/converter

Analyze the terminal output to locate any version of @dicebear/converter in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 9.4.0), your application is affected.

Note: The npm ls @dicebear/converter command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-770: Allocation of Resources Without Limits or Throttling, where the product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated. In @dicebear/converter, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact The `ensureSize()` function in `@dicebear/converter` (versions < 9.4.0) read the `width` and `height` attributes from the input SVG to determine the output canvas size for rasterization (PNG, JPEG, WebP, AVIF). An attacker who can supply a crafted SVG with extremely large dimensions (e.g. `width="999999999"`) could force the server to allocate excessive memory, leading to denial of service. This primarily affects server-side applications that pass **untrusted or user-supplied SVGs** to the converter's `toPng()`, `toJpeg()`, `toWebp()`, or `toAvif()` functions. Applications that only convert self-generated DiceBear avatars are not practically exploitable, but are still recommended to upgrade. ### Patches Fixed in version **9.4.0**. The `ensureSize()` function no longer reads SVG attributes to determine output size. Instead, a new `size` option (default: 512, max: 2048) controls the output dimensions. Invalid values (NaN, negative, zero, Infinity) fall back to the default. ### Workarounds If upgrading is not immediately possible, validate and sanitize the `width` and `height` attributes of any untrusted SVG input before passing it to the converter.

CVE-2026-29112 Affected @dicebear/converter Versions

1 component(s)
Fixed Versions:
9.4.0
Product / Package Ecosystem Affected Versions Fixed Version
@dicebear/converter
npm
< 9.4.0
9.4.0

References

Frequently Asked Questions

What is CVE-2026-29112?
CVE-2026-29112 is a security vulnerability in @dicebear/converter involving Uncontrolled memory allocation via crafted SVG dimensions in @dicebear/converter under CWE-770: Allocation of Resources Without Limits or Throttling.
Which @dicebear/converter versions are affected?
Affected versions include releases prior to 9.4.0 across affected packages: @dicebear/converter.
What version fixes CVE-2026-29112?
Upgrading to 9.4.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @dicebear/converter affected?
Yes, @dicebear/converter is affected in releases prior to 9.4.0. Upgrade your dependency to 9.4.0 or later.
What is the CVSS score of CVE-2026-29112?
CVE-2026-29112 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2026-29112?
CVE-2026-29112 is classified under CWE-770: Allocation of Resources Without Limits or Throttling (The product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated.).
How can I check npm dependencies for CVE-2026-29112?
Run the dependency tree command: 'npm ls @dicebear/converter'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-v3r3-4qgc-vw66",
  "modified" : "2026-03-19T21:00:24Z",
  "published" : "2026-03-16T16:15:33Z",
  "aliases" : [ "CVE-2026-29112" ],
  "summary" : "Uncontrolled memory allocation via crafted SVG dimensions in @dicebear/converter",
  "details" : "### Impact\n\nThe `ensureSize()` function in `@dicebear/converter` (versions < 9.4.0) read the `width` and `height` attributes from the input SVG to determine the output canvas size for rasterization (PNG, JPEG, WebP, AVIF). An attacker who can supply a crafted SVG with extremely large dimensions (e.g. `width=\"999999999\"`) could force the server to allocate excessive memory, leading to denial of service.\n\nThis primarily affects server-side applications that pass **untrusted or user-supplied SVGs** to the converter's `toPng()`, `toJpeg()`, `toWebp()`, or `toAvif()` functions. Applications that only convert self-generated DiceBear avatars are not practically exploitable, but are still recommended to upgrade.\n\n### Patches\n\nFixed in version **9.4.0**. The `ensureSize()` function no longer reads SVG attributes to determine output size. Instead, a new `size` option (default: 512, max: 2048) controls the output dimensions. Invalid values (NaN, negative, zero, Infinity) fall back to the default.\n\n### Workarounds\n\nIf upgrading is not immediately possible, validate and sanitize the `width` and `height` attributes of any untrusted SVG input before passing it to the converter.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@dicebear/converter"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "9.4.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/dicebear/dicebear/security/advisories/GHSA-v3r3-4qgc-vw66"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-29112"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/dicebear/dicebear/commit/42a59eac46a3c68598859e608ec45e578b27614a"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/dicebear/dicebear"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/dicebear/dicebear/releases/tag/v9.4.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-770" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-16T16:15:33Z",
    "nvd_published_at" : "2026-03-18T04:17:16Z"
  }
}