Skip to main content

CVE-2026-94545: One Satori Escaping Bug, Moderate in the Library and Critical in next/og

· 8 min read
Ankush K
Co-founder and CTO, Dwaar
CVE-2026-94545: One Satori Escaping Bug, Moderate in the Library and Critical in next/og

Vercel published two advisories for one escaping bug on Tuesday, and they do not agree on how bad it is. Satori's GHSA-wx4j-mvgx-mqwp calls it Moderate, CVSS 5.3. Next.js's GHSA-vcvr-r3jv-pc5j calls it Critical, CVSS 9.5, with remote code execution in the title. Both list CVE-2026-94545, but Vercel's security update and the 16.3.6 release notes use only the GHSA IDs, so search for those as well. The question that matters is which advisory describes your app.

ItemDetail
IdentifierGHSA-wx4j-mvgx-mqwp for Satori, GHSA-vcvr-r3jv-pc5j for Next.js. Both repository advisories list CVE-2026-94545
Affectedsatori >= 0.0.27, < 0.33.5. next >= 16.2.0, < 16.3.6, Node.js ImageResponse in next/og only
Fixed insatori 0.33.5, next 16.3.6
SeverityVendor scored, CVSS v4: Moderate 5.3 in the Satori advisory, Critical 9.5 in the Next.js advisory
Exploited as of 2026-09-24No exploitation or public proof of concept reported in either advisory. Not listed in CISA KEV
Disclosed2026-09-22

What is broken​

Satori says it does not properly escape certain values before including them in generated SVG. The useful detail is in the fix commit from PR #814.

Before the fix, Satori assembled much of its SVG by string interpolation, in several places:

  • The shared buildXMLString helper in src/utils.ts wrote attribute values straight into markup.
  • The inline <svg> path in src/handler/preprocess.ts interpolated attribute values, style values and element names, and emitted non-object children with String(node).
  • rect.ts, text.ts and others built wrapper tags such as <g clip-path="url(#...)"> by hand.
  • src/handler/expand.ts copied caller-supplied style keys starting with _ into the serialized style. Those are Satori's internal fields, such as _inheritedClipPathId, and they are later written into markup.

So a color or font-family containing a double quote could close the attribute and add new SVG elements. The regression tests added with the fix do exactly this, with a color value that injects a path element.

The core of it, verbatim from the commit:

- attrString += ` ${k}="${_v}"`
+ attrString += ` ${k}="${escapeXMLAttribute(_v)}"`

The rest of the fix is the part I would copy. buildXMLString now validates element and attribute names and throws on bad ones, because, as the code comment puts it, "Names cannot be escaped". Text children get escaped, the hand-built wrapper tags now go through the helper, and underscore-prefixed style keys from callers throw Invalid style property. & is now also encoded in embedded SVG data URLs so that inner XML entities survive the enclosing parse. One serializer everything goes through beats many call sites that each have to remember.

What Vercel has and has not said about the RCE step​

That is markup injection. The Next.js advisory says the Node.js ImageResponse "is affected by an upstream vulnerability. This can lead to remote code execution." Affected apps, it says, "pass attacker-controlled values into SVG content, attributes, or styles during image generation". Its example is a query parameter inside an SVG <title>.

Neither advisory explains the step. Vercel's security update says that, under specific conditions, improper escaping in Satori's SVG output could lead to RCE "due to vulnerabilities in other upstream dependencies", and that the fix upgrades them. It does not name those dependencies or the path. I am not going to guess. Treat the RCE as the maintainer's stated assessment, with those specifics unpublished, and act on it anyway.

The vectors tell the rest. Both share AV:N/AC:L/AT:P/PR:N. Satori's has passive user interaction and no impact on the vulnerable system, with high confidentiality and integrity impact on subsequent systems. Next.js's has no user interaction and high impact across all six metrics. Satori says it plainly: "The impact depends on how the generated SVG is consumed."

Same package, very different risk​

Take two apps on next 16.3.5. One renders social cards from strings fixed at build time. The other reads a title from the query string. Version matching reports the same finding for both, and by the Next.js advisory only the second is exposed: apps that never pass attacker-controlled values into SVG are not affected, and neither is the Edge ImageResponse.

// Illustration, not from the advisory: the shape to search for.
const title = new URL(request.url).searchParams.get('title')
return new ImageResponse(<svg><title>{title}</title></svg>)

My position has three parts.

Use reachability to order the queue, not to skip the patch. Your read of a data flow can be wrong, and the fix is a version bump. A finding is a claim, and a version match only starts the investigation.

Read "attacker-controlled" broadly. A query parameter is the obvious case. A display name, a product title or a CMS field that outside users can edit is the same input with a delay.

Do not treat 5.3 as a ceiling if you call Satori directly. That score describes a library whose risk lives downstream, and the Next.js advisory shows a consumer can change the answer completely. CVSS is not risk, and this CVE has two scores to prove it.

What to check now​

  1. Check your next version. If it is >= 16.2.0, < 16.3.6, go to 16.3.6 or later. Vercel also shipped 15.5.26, but its security update labels that release hardening only and says Next.js 15.x is not affected by the RCE. Do not rely on searching your lockfile for satori: the Next.js fix patches @vercel/og@0.11.1 and updates compiled og bundles, so I would treat the next version as the thing to check.
  2. Check direct Satori use. Move to 0.33.5 or later, then find out what consumes the SVG you generate.
  3. Find your exposed routes. Look for ImageResponse from next/og on the Node.js runtime, then trace whether query parameters, headers or body values reach the JSX.
  4. If you cannot upgrade today, stop passing attacker-controlled values into SVG content, attributes or styles. This is a stopgap. Satori says "No complete workaround exists besides upgrading."
  5. Expect new errors. The Satori fix throws Invalid XML element name, Invalid XML attribute name and Invalid style property. Code that deliberately passes underscore-prefixed styles will now fail, so test image routes before you ship.
  6. Look at your logs, with low expectations. The sources publish no detection guidance or indicators. My inference from the fix: look for quotes or angle brackets followed by /> or tag names in parameters feeding image routes and, after upgrading, the error strings above, which come from the Satori diff. Finding nothing proves nothing.

Both advisories credit RaghavMaheshwari124 and rafabd1 as finders.

One check to run this week​

The reachability question can be answered by hand. Open your busiest Next.js repository, list every route that returns ImageResponse, and write down where each rendered string comes from. Any string you cannot trace to something you control goes to the top of the upgrade queue.

References​