Medium

Nuxt OG Image cache poisoning through derivable cache keys on unsigned dynamic image routes

  • Disclosed: 15.10.2026
  • Updated: 19.10.2026 08:00

Vendor: Nuxt Product: Nuxt OG Image Version: 6.2.5 Description: Due to the specifics of caching and key generation in the Open Graph image cache created by the module, an unauthenticated attacker can modify the content of the image (for example, the title parameter) that is delivered to the user. Impact: Content Spoofing Vulnerable component: route /_og/d/*.png Exploitation conditions: Access to the application Mitigation: Upgrade to 6.7.2 and set a sufficiently secure secret in config ogImage Researcher: Dmitry Vanin (Positive Technologies)

Research

During the previous vulnerability research,) it was discovered that version 6.2.5 changed the mechanism for generating cache indexes; it now takes into account the parameters passed during image generation.

However, the image is still generated from data transmitted to the attacker.

Listing 1. New code for generating indexes in cache

js
export function resolvePathCacheKey(e: H3Event, path: string, resolvedOptions?: Record<string, any>) {
  const siteConfig = getSiteConfig(e, {
    resolveRefs: true,
  })
  const basePath = withoutTrailingSlash(withoutLeadingSlash(normalizeKey(path)))
  const hashParts: any[] = [
    basePath,
    import.meta.prerender ? '' : siteConfig.url,
  ]
  // Hash resolved options (not raw query string) so unknown/extra query params
  // cannot produce unique cache keys and bypass the cache.
  if (resolvedOptions)
    hashParts.push(hash(resolvedOptions))
  return [
    (!basePath || basePath === '/') ? 'index' : basePath,
    hash(hashParts),
  ].join(':')
}

In this case, basePath is obtained from the _path parameter, resolvedOptions are the normalized settings of the component, for example:

Listing 2. An example of resolvedOptions

{"emojis":"noto","extension":"png","width":1200,"height":600,"cacheMaxAgeSeconds":259200,"component":"OgImageDefaultImageTakumi"}

From the analysis of resolvedOptions, it was concluded that, in general, all parameters are known either from the direct link to the OG Image or from the server response.

Vulnerability reproduction

  1. Find the route to OG Image. Figure 1. Demonstration of finding the route to OG Image image (width: 974, height: 361)

  2. Retrieve parameters from the server's response, especially cacheMaxAgeSeconds (cache-control header, s-maxage key), the other parameters are known from the meta tags as well as from the c_<component name> parameter. Figure 2. Obtaining parameters image (width: 974, height: 245)

  3. Generate a cache key using a script. Listing 3. Srcipt

js
import {hash} from "ohash";

var url = "https://contoso.com"

var obj = JSON.parse(`{"emojis":"noto","extension":"png","width":1200,"height":600,"cacheMaxAgeSeconds":259200,"component":"OgImageBlogPostTakumi"}`)

var basePath = '/'

var hashParts = [
    basePath,
    url
  ]
  
if (obj)
	hashParts.push(hash(obj))

console.log([
    (!basePath || basePath === '/') ? 'index' : basePath,
    hash(hashParts),
  ].join(':'))
  1. Repeat the steps as in the vulnerability 1,), but transmit the obtained cacheKey in addition.

  2. Thus, the same result as in the vulnerability 1) was obtained. Figure 4. Server response image (width: 974, height: 729)

Credits

Researcher: Dmitry Vanin (Positive Technologies)

What to do

Upgrade to 6.7.2 and set a sufficiently secure secret in config ogImage.

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
npm package nuxt-og-image >= 6.2.5, < 6.7.0 6.7.0

References

CVSS score -
CVSS vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
Weakness (CWE)
CWE-349
Platform
npm
Package
nuxt-og-image
Disclosed
15.10.2026
Updated
19.10.2026 08:00

Sources and licenses · Edited or translated by DockRay; source rights and applicable licenses are retained.

OSV / GitHub Advisory Database - GHSA-2x6f-rp82-ppmj - CC BY 4.0

Vulnerability history: nuxt-og-image

All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.

Total entries
6
First → latest
03.2026 10.2026
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • Medium 5
  • Low 1

Disclosures per year

  1. 2026: 6
  1. Nuxt OG Image cache poisoning through derivable cache keys on unsigned dynamic image routes this entry
    Medium CVE-2026-102527 >= 6.2.5, < 6.7.0 6.7.0
  2. Medium CVE-2026-61793 >= 6.0.2, < 6.7.0 6.7.0

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.