CVE-2024-53386: Stage js Stage.js DOM Clobbering Vulnerabilty Vulnerability

MODERATE
Advisory Identifier: GHSA-fp3m-g5rc-4c28
CVSS 4.9
CWE-94 CWE-79
Published
Advisory Summary

CVE-2024-53386 is a MODERATE (CVSS 4.9) stage.js dom clobbering vulnerabilty vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Stage js libraries in the npm ecosystem. The issue involves stage.js dom clobbering vulnerabilty. Remediation is available in the latest vendor maintenance releases.

CVE-2024-53386 at a Glance

CVE Identifier CVE-2024-53386
GHSA Identifier GHSA-fp3m-g5rc-4c28
Severity MODERATE
CVSS v3.1 Base Score 4.9
CWE Classification CWE-94: Improper Control of Generation of Code ('Code Injection')
Affected Product Stage js
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 4.9

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:L/I:L/A:N).

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

How to Fix CVE-2024-53386

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

stage-js fixed: Latest secure release
npm install stage-js@Latest secure release
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 stage-js

How to Check if You Are Affected

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

npm ls stage-js

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

Note: The npm ls stage-js 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-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Stage js, 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

Stage.js through 0.8.10 allows DOM Clobbering (with resultant XSS for untrusted input that contains HTML but does not directly contain JavaScript), because document.currentScript lookup can be shadowed by attacker-injected HTML elements.

CVE-2024-53386 Affected Stage js Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
stage-js
npm
≤ 0.8.10

References

Frequently Asked Questions

What is CVE-2024-53386?
CVE-2024-53386 is a security vulnerability in Stage js involving Stage.js DOM Clobbering vulnerabilty under CWE-94: Improper Control of Generation of Code ('Code Injection').
Which Stage js versions are affected?
Affected versions include releases prior to current release patches across affected packages: stage-js.
What version fixes CVE-2024-53386?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is stage-js affected?
Yes, stage-js is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2024-53386?
CVE-2024-53386 has a CVSS v3.1 base score of 4.9 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2024-53386?
CVE-2024-53386 is classified under CWE-94: Improper Control of Generation of Code ('Code Injection') (The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.).
How can I check npm dependencies for CVE-2024-53386?
Run the dependency tree command: 'npm ls stage-js'. 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-fp3m-g5rc-4c28",
  "modified" : "2025-06-30T12:51:24Z",
  "published" : "2025-03-03T09:30:34Z",
  "aliases" : [ "CVE-2024-53386" ],
  "summary" : "Stage.js DOM Clobbering vulnerabilty",
  "details" : "Stage.js through 0.8.10 allows DOM Clobbering (with resultant XSS for untrusted input that contains HTML but does not directly contain JavaScript), because document.currentScript lookup can be shadowed by attacker-injected HTML elements.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "stage-js"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "0.8.10"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-53386"
  }, {
    "type" : "WEB",
    "url" : "https://gist.github.com/jackfromeast/31d56f1ad17673aabb6ab541e65a5534"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/piqnt/stage.js"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/piqnt/stage.js/blob/919f6e94b14242f6e6994141a9e1188439d306d5/lib/core.js#L158-L159"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79", "CWE-94" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-03-03T20:17:21Z",
    "nvd_published_at" : "2025-03-03T07:15:34Z"
  }
}