CVE-2026-34405: Nuxt og image Cross-Site Scripting Vulnerability

MODERATE
Advisory Identifier: GHSA-mg36-wvcr-m75h
CVSS 6.1
CWE-79
Published
Advisory Summary

CVE-2026-34405 is a MODERATE (CVSS 6.1) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Nuxt og image libraries in the npm ecosystem. The issue involves nuxt og image is vulnerable to reflected xss via query parameter injection into html attributes. Remediation is available by upgrading affected packages to version 6.2.5.

CVE-2026-34405 at a Glance

CVE Identifier CVE-2026-34405
GHSA Identifier GHSA-mg36-wvcr-m75h
Severity MODERATE
CVSS v3.1 Base Score 6.1
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Nuxt og image
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 6.1

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:R/S:C/C:L/I:L/A:N).

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

How to Fix CVE-2026-34405

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

nuxt-og-image fixed: 6.2.5
npm install nuxt-og-image@6.2.5
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 nuxt-og-image

How to Check if You Are Affected

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

npm ls nuxt-og-image

Analyze the terminal output to locate any version of Nuxt og image in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 6.2.5), your application is affected.

Note: The npm ls nuxt-og-image 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-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Nuxt og image, 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

**Product:** Nuxt OG Image **Version:** 6.1.2 **CWE-ID:** [CWE-79](https://cwe.mitre.org/data/definitions/79.html): Improper Neutralization of Input During Web Page Generation **Description:** Incorrect parsing of GET parameters leads to the possibility of HTML injection and JavaScript code injection. **Impact:** Client-Side JavaScript Execution **Exploitation condition:** An external user **Mitigation:** Correct the logic of parsing GET parameters and their subsequent implementation into the generated page. **Researcher:** Dmitry Prokhorov (Positive Technologies) ## Research During the analysis of the nuxt-og-image package, which is shipped with the nuxt-seo package, a zero‑day vulnerability was discovered. This research revealed that the image‑generation component by the URI: `/_og/d/` (and, in older versions, `/og-image/`) contains a vulnerability that allows injection of arbitrary attributes into the HTML page body. The vulnerability was reproduced using the standard configuration and the default templates. _Listing 1. The content of the configuration file `nuxt.config.ts`_ ``` export default defineNuxtConfig({ modules: ['nuxt-og-image'], devServer: { host: 'web-test.local', port: 3000 }, site: { url: 'http://web-test.local:3000', }, ogImage: { fonts: [ 'Inter:400', 'Inter:700' ], } }) ``` ## Vulnerability reproduction To demonstrate the proof‑of‑concept, follow the URI: `/_og/d/og.html?width=1000&height=1000&onmouseover=alert(document.cookie)&autofocus` The injected parameters `onmouseover=alert(document.cookie)` and `autofocus` are treated as attributes and are inserted directly into the generated HTML page. _Listing 2. HTTP-request example_ ``` GET /_og/d/og.html?width=1000&height=1000&onmouseover=alert(document.cookie) HTTP/1.1 Host: web-test.local:3000 ``` _Figure 1. The injected attribute in the HTML body_ <img width="974" height="670" alt="image" src="https://github.com/user-attachments/assets/d442c235-71a5-4da9-a963-8cf4b8614745" /> _Figure 2. JavaScript code execution_ <img width="974" height="291" alt="image" src="https://github.com/user-attachments/assets/01579f19-8e80-4fae-8516-5903370ee6d8" /> ## Credits Researcher: Dmitry Prokhorov (Positive Technologies)

CVE-2026-34405 Affected Nuxt og image Versions

1 component(s)
Fixed Versions:
6.2.5
Product / Package Ecosystem Affected Versions Fixed Version
nuxt-og-image
npm
< 6.2.5
6.2.5

References

Frequently Asked Questions

What is CVE-2026-34405?
CVE-2026-34405 is a security vulnerability in Nuxt og image involving Nuxt OG Image is vulnerable to reflected XSS via query parameter injection into HTML attributes under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Nuxt og image versions are affected?
Affected versions include releases prior to 6.2.5 across affected packages: nuxt-og-image.
What version fixes CVE-2026-34405?
Upgrading to 6.2.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is nuxt-og-image affected?
Yes, nuxt-og-image is affected in releases prior to 6.2.5. Upgrade your dependency to 6.2.5 or later.
What is the CVSS score of CVE-2026-34405?
CVE-2026-34405 has a CVSS v3.1 base score of 6.1 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2026-34405?
CVE-2026-34405 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.).
How can I check npm dependencies for CVE-2026-34405?
Run the dependency tree command: 'npm ls nuxt-og-image'. 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-mg36-wvcr-m75h",
  "modified" : "2026-04-06T16:39:56Z",
  "published" : "2026-03-31T23:27:03Z",
  "aliases" : [ "CVE-2026-34405" ],
  "summary" : "Nuxt OG Image is vulnerable to reflected XSS via query parameter injection into HTML attributes",
  "details" : "**Product:** Nuxt OG Image \n**Version:** 6.1.2\n**CWE-ID:** [CWE-79](https://cwe.mitre.org/data/definitions/79.html): Improper Neutralization of Input During Web Page Generation\n**Description:** Incorrect parsing of GET parameters leads to the possibility of HTML injection and JavaScript code injection.\n**Impact:** Client-Side JavaScript Execution\n**Exploitation condition:** An external user\n**Mitigation:** Correct the logic of parsing GET parameters and their subsequent implementation into the generated page.\n**Researcher:** Dmitry Prokhorov (Positive Technologies)\n\n## Research \nDuring the analysis of the nuxt-og-image package, which is shipped with the nuxt-seo package, a zero‑day vulnerability was discovered.\nThis research revealed that the image‑generation component by the URI: `/_og/d/` (and, in older versions, `/og-image/`) contains a vulnerability that allows injection of arbitrary attributes into the HTML page body. The vulnerability was reproduced using the standard configuration and the default templates.\n\n\n_Listing 1. The content of the configuration file `nuxt.config.ts`_ \n```\nexport default defineNuxtConfig({\n  modules: ['nuxt-og-image'],\n  devServer: {\n    host: 'web-test.local',\n    port: 3000\n  },\n  site: {\n    url: 'http://web-test.local:3000',\n  },\n  ogImage: {\n    fonts: [\n      'Inter:400', \n      'Inter:700'\n    ],\n  }\n})\n```\n\n## Vulnerability reproduction\nTo demonstrate the proof‑of‑concept, follow the URI: `/_og/d/og.html?width=1000&height=1000&onmouseover=alert(document.cookie)&autofocus`\nThe injected parameters `onmouseover=alert(document.cookie)` and `autofocus` are treated as attributes and are inserted directly into the generated HTML page.\n\n\n_Listing 2. HTTP-request example_\n```\nGET /_og/d/og.html?width=1000&height=1000&onmouseover=alert(document.cookie) HTTP/1.1\nHost: web-test.local:3000\n```\n\n_Figure 1. The injected attribute in the HTML body_\n<img width=\"974\" height=\"670\" alt=\"image\" src=\"https://github.com/user-attachments/assets/d442c235-71a5-4da9-a963-8cf4b8614745\" />\n\n_Figure 2. JavaScript code execution_\n<img width=\"974\" height=\"291\" alt=\"image\" src=\"https://github.com/user-attachments/assets/01579f19-8e80-4fae-8516-5903370ee6d8\" />\n\n\n## Credits\nResearcher: Dmitry Prokhorov (Positive Technologies)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "nuxt-og-image"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "6.2.5"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/nuxt-modules/og-image/security/advisories/GHSA-mg36-wvcr-m75h"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-34405"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/nuxt-modules/og-image"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-31T23:27:03Z",
    "nvd_published_at" : "2026-03-31T22:16:18Z"
  }
}