Get a Demo

Let's Patch It!

Book a short call with one our specialists, we'll walk you through how Endor Patches work, and ask you a few questions about your environment (like your primary programming languages and repository management). We'll also send you an email right after you fill out the form, feel free to reply with any questions you have in advance!

CVE

GHSA-vcvr-r3jv-pc5j

Next.js: Remote Code Execution in next/og ImageResponse
Back to all
CVE

GHSA-vcvr-r3jv-pc5j

Next.js: Remote Code Execution in next/og ImageResponse

Impact

The Node.js ImageResponse implementation from next/og is affected by an upstream vulnerability. This can lead to remote code execution.

Affected applications pass attacker-controlled values into SVG content, attributes, or styles during image generation:

import { ImageResponse } from 'next/og'
export async function GET(request: Request) {
  const value = new URL(request.url).searchParams.get('value') ?? ''
  return new ImageResponse(
    <svg width="1200" height="630">
      <title>{value}</title>
    </svg>
  )
}

Applications using the Edge ImageResponse implementation, or applications that do not pass attacker-controlled values into SVG content, attributes, or styles, are not affected.

Workaround

If upgrading is not immediately possible, do not pass attacker-controlled values into SVG content, attributes, or styles rendered by the Node.js ImageResponse implementation from next/og.

Package Versions Affected

Package Version
patch Availability
No items found.

Automatically patch vulnerabilities without upgrading

Fix Without Upgrading
Detect compatible fix
Apply safe remediation
Fix with a single pull request

CVSS Version

Severity
Base Score
CVSS Version
Score Vector
C
H
U
-
C
H
U
0
-
C
H
U
10
-
3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H

Related Resources

No items found.

References

https://github.com/vercel/next.js/security/advisories/GHSA-vcvr-r3jv-pc5j, https://github.com/vercel/satori/security/advisories/GHSA-wx4j-mvgx-mqwp, https://github.com/vercel/next.js/commit/868fad38690d72088868f299fa2bef339b26838e, https://github.com/vercel/next.js, https://github.com/vercel/next.js/releases/tag/v16.3.6

Severity

10

CVSS Score
0
10

Basic Information

Base CVSS
10
EPSS Probability
0%
EPSS Percentile
0%
Introduced Version
16.2.0,16.4.0-canary.0,16.2.0-canary.81,0
Fix Available
16.3.6,16.4.0-canary.39,2.4.0-r1,0.37.10-r1,4.19.4-r1

Fix Critical Vulnerabilities Instantly

Secure your app without upgrading.
Fix Without Upgrading