CVE-2025-13158: Apidoc core Apidoc-core Has A Prototype Pollution Vulnerability

CRITICAL
Advisory Identifier: GHSA-6vj3-p34w-xxjp
CWE-1321
Published
Advisory Summary

CVE-2025-13158 is a CRITICAL apidoc-core has a prototype pollution vulnerability (CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')) affecting Apidoc core libraries in the npm ecosystem. The issue involves apidoc-core has a prototype pollution vulnerability. Remediation is available in the latest vendor maintenance releases.

CVE-2025-13158 at a Glance

CVE Identifier CVE-2025-13158
GHSA Identifier GHSA-6vj3-p34w-xxjp
Severity CRITICAL
CVSS v3.1 Base Score N/A
CWE Classification CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')
Affected Product Apidoc core
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2025-13158

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

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

How to Check if You Are Affected

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

npm ls apidoc-core

Analyze the terminal output to locate any version of Apidoc core 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 apidoc-core 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 Apidoc core, 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

Prototype pollution vulnerability in apidoc-core versions 0.2.0 and all subsequent versions allows remote attackers to modify JavaScript object prototypes via malformed data structures, including the “define” property processed by the application, potentially leading to denial of service or unintended behavior in applications relying on the integrity of prototype chains. This affects the preProcess() function in api_group.js, api_param_title.js, api_use.js, and api_permission.js worker modules.

CVE-2025-13158 Affected Apidoc core Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
apidoc-core
npm
≥ 0.2.0
≤ 0.15.0

References

Frequently Asked Questions

What is CVE-2025-13158?
CVE-2025-13158 is a security vulnerability in Apidoc core involving apidoc-core has a prototype pollution vulnerability under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution').
Which Apidoc core versions are affected?
Affected versions include releases prior to current release patches across affected packages: apidoc-core.
What version fixes CVE-2025-13158?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is apidoc-core affected?
Yes, apidoc-core is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What CWE is associated with CVE-2025-13158?
CVE-2025-13158 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-2025-13158?
Run the dependency tree command: 'npm ls apidoc-core'. 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-6vj3-p34w-xxjp",
  "modified" : "2025-12-26T19:50:17Z",
  "published" : "2025-12-26T18:30:26Z",
  "aliases" : [ "CVE-2025-13158" ],
  "summary" : "apidoc-core has a prototype pollution vulnerability",
  "details" : "Prototype pollution vulnerability in apidoc-core versions 0.2.0 and all subsequent versions allows remote attackers to modify JavaScript object prototypes via malformed data structures, including the “define” property processed by the application, potentially leading to denial of service or unintended behavior in applications relying on the integrity of prototype chains. This affects the preProcess() function in api_group.js, api_param_title.js, api_use.js, and api_permission.js worker modules.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "apidoc-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.2.0"
      }, {
        "last_affected" : "0.15.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-13158"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/apidoc/apidoc-core"
  }, {
    "type" : "WEB",
    "url" : "https://www.sonatype.com/security-advisories/cve-2025-13158"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1321" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-12-26T19:50:17Z",
    "nvd_published_at" : "2025-12-26T16:15:43Z"
  }
}