Vulnerabilities in pkg:npm/redoc

PACKAGE
Advisory Identifier: GHSA-9rhg-254w-fh9x
Advisory Summary

CVE-2024-57083 is a HIGH redoc prototype pollution vulnerability (CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')) affecting Redoc libraries in the npm ecosystem. The issue involves redoc prototype pollution via `module.mergeobjects` component. Remediation is available by upgrading affected packages to version 2.4.0.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/redoc

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/redoc. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-9rhg-254w-fh9x CVE-2024-57083 HIGH Redoc Prototype Pollution via `Module.mergeObjects` Component

CVE-2024-57083 at a Glance

CVE Identifier CVE-2024-57083
GHSA Identifier GHSA-9rhg-254w-fh9x
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')
Affected Product Redoc
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2024-57083

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

redoc fixed: 2.4.0
npm install redoc@2.4.0
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 redoc

How to Check if You Are Affected

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

npm ls redoc

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

Note: The npm ls redoc 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-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution'), where the product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype. In Redoc, 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

A prototype pollution in the component Module.mergeObjects (redoc/bundles/redoc.lib.js:2) of redoc <= 2.2.0 allows attackers to cause a Denial of Service (DoS) via supplying a crafted payload.

CVE-2024-57083 Affected Redoc Versions

1 component(s)
Fixed Versions:
2.4.0
Product / Package Ecosystem Affected Versions Fixed Version
redoc
npm
< 2.4.0
2.4.0

References

Frequently Asked Questions

What is CVE-2024-57083?
CVE-2024-57083 is a security vulnerability in Redoc involving Redoc Prototype Pollution via `Module.mergeObjects` Component under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution').
Which Redoc versions are affected?
Affected versions include releases prior to 2.4.0 across affected packages: redoc.
What version fixes CVE-2024-57083?
Upgrading to 2.4.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is redoc affected?
Yes, redoc is affected in releases prior to 2.4.0. Upgrade your dependency to 2.4.0 or later.
What CWE is associated with CVE-2024-57083?
CVE-2024-57083 is classified under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution') (The product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype.).
How can I check npm dependencies for CVE-2024-57083?
Run the dependency tree command: 'npm ls redoc'. 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-9rhg-254w-fh9x",
  "modified" : "2025-03-31T15:58:51Z",
  "published" : "2025-03-28T21:30:47Z",
  "aliases" : [ "CVE-2024-57083" ],
  "summary" : "Redoc Prototype Pollution via `Module.mergeObjects` Component",
  "details" : "A prototype pollution in the component Module.mergeObjects (redoc/bundles/redoc.lib.js:2) of redoc <= 2.2.0 allows attackers to cause a Denial of Service (DoS) via supplying a crafted payload.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:P"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "redoc"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.4.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-57083"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Redocly/redoc/issues/2499"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Redocly/redoc/pull/2638"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/Redocly/redoc"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1321" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-03-31T15:58:51Z",
    "nvd_published_at" : "2025-03-28T21:15:17Z"
  }
}