Nuxt OG Image vulnerable to Server-Side Request Forgery via user-controlled parameters

Description

Product: Nuxt OG Image
Version: < 6.2.5
CWE-ID: CWE-918: Server-Side Request Forgery

Description

The image generation endpoint (/_og/d/) accepts user-controlled parameters that are passed to the server-side renderer without proper validation or filtering. An attacker can trigger server-side requests to internal network addresses through multiple vectors.

Impact

  • Scanning internal ports and services inaccessible from the outside
  • Reading sensitive data from cloud infrastructure metadata services (tokens, credentials) when verbose error output is enabled

Attack Vectors

Three distinct vectors were identified, all exploiting the same underlying lack of URL validation:

Vector 1: CSS background-image injection via style parameter

GET /_og/d/og.png?style=background-image:+url(&#x27;http://127.0.0.1:8888/secret&#x27;)

Vector 2: &lt;img src&gt; injection via html parameter

GET /_og/d/og.png?html=&lt;img src=&quot;http://127.0.0.1:8888/secret&quot;&gt;

When verbose errors are enabled, the response content is leaked in base64-encoded error messages.

Vector 3: SVG &lt;image href&gt; injection via html parameter

GET /_og/d/og.png?html=&lt;svg&gt;&lt;image href=&quot;http://127.0.0.1:8888/secret&quot;&gt;&lt;/svg&gt;

Mitigation

Fixed in v6.2.5. The image source plugin now blocks requests to private IP ranges (IPv4/IPv6), loopback addresses, link-local addresses, and cloud metadata endpoints. Decimal/hexadecimal IP encoding bypasses are also handled.

Credits

Researcher: Dmitry Prokhorov (Positive Technologies)

Basic information

Type
reviewed
Severity
medium
Advisory on GitHub
Open advisory ↗
Repository advisory
Open repository advisory ↗
Source code
Browse source ↗
Published (advisory)
2026-03-31 23:26:29 UTC
Updated
2026-03-31 23:26:32 UTC
GitHub reviewed
2026-03-31 23:26:29 UTC

CVSS Scores

Base score Version Severity Vector
5.3 3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:L)
Some sensitive info could get out, but not a total data dump.
Integrity (I:N)
Data isn’t meaningfully altered or forged.
Availability (A:N)
Service keeps running; no real outage angle.

Identifiers

Type Value
GHSA GHSA-pqhr-mp3f-hrpp ↗

CWEs

CWE id Name
CWE-918 Server-Side Request Forgery (SSRF)

Affected packages (1)

Vulnerable version ranges and first patched releases as published by GitHub.

Ecosystem Package Vulnerable range First patched Vulnerable functions
npm nuxt-og-image < 6.2.5 6.2.5

References

cvelogic Threat Intelligence