Vulnerabilities in pkg:npm/superagent

PACKAGE
Advisory Identifier: GHSA-8225-6cvr-8pqp
Advisory Summary

CVE-2017-16129 is a MODERATE (CVSS 5.9) superagent vulnerable to zip bomb vulnerability (CWE-409: Improper Handling of Highly Compressed Data (Data Amplification)) affecting Superagent libraries in the npm ecosystem. The issue involves superagent vulnerable to zip bomb attacks. Remediation is available by upgrading affected packages to version 3.7.0.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/superagent

1 Known Advisory Record(s)

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

Advisory ID CVE / NVD Severity Summary
GHSA-8225-6cvr-8pqp CVE-2017-16129 MODERATE superagent vulnerable to zip bomb attacks

CVE-2017-16129 at a Glance

CVE Identifier CVE-2017-16129
GHSA Identifier GHSA-8225-6cvr-8pqp
Severity MODERATE
CVSS v3.1 Base Score 5.9
CWE Classification CWE-409: Improper Handling of Highly Compressed Data (Data Amplification)
Affected Product Superagent
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 5.9

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

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

How to Fix CVE-2017-16129

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

superagent fixed: 3.7.0
npm install superagent@3.7.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 superagent

How to Check if You Are Affected

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

npm ls superagent

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

Note: The npm ls superagent 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-409: Improper Handling of Highly Compressed Data (Data Amplification), where the product does not handle or incorrectly handles a compressed input with a very high compression ratio that produces a large output. In Superagent, 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

Affected versions of `superagent` do not check the post-decompression size of ZIP compressed HTTP responses prior to decompressing. This results in the package being vulnerable to a [ZIP bomb](https://en.wikipedia.org/wiki/Zip_bomb) attack, where an extremely small ZIP file becomes many orders of magnitude larger when decompressed. This may result in unrestrained CPU/Memory/Disk consumption, causing a denial of service condition. ## Recommendation Update to version 3.7.0 or later.

CVE-2017-16129 Affected Superagent Versions

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

References

Frequently Asked Questions

What is CVE-2017-16129?
CVE-2017-16129 is a security vulnerability in Superagent involving superagent vulnerable to zip bomb attacks under CWE-409: Improper Handling of Highly Compressed Data (Data Amplification).
Which Superagent versions are affected?
Affected versions include releases prior to 3.7.0 across affected packages: superagent.
What version fixes CVE-2017-16129?
Upgrading to 3.7.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is superagent affected?
Yes, superagent is affected in releases prior to 3.7.0. Upgrade your dependency to 3.7.0 or later.
What is the CVSS score of CVE-2017-16129?
CVE-2017-16129 has a CVSS v3.1 base score of 5.9 (MODERATE) with vector string CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2017-16129?
CVE-2017-16129 is classified under CWE-409: Improper Handling of Highly Compressed Data (Data Amplification) (The product does not handle or incorrectly handles a compressed input with a very high compression ratio that produces a large output.).
How can I check npm dependencies for CVE-2017-16129?
Run the dependency tree command: 'npm ls superagent'. 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-8225-6cvr-8pqp",
  "modified" : "2023-09-08T23:55:11Z",
  "published" : "2018-08-09T20:13:01Z",
  "aliases" : [ "CVE-2017-16129" ],
  "summary" : "superagent vulnerable to zip bomb attacks",
  "details" : "Affected versions of `superagent` do not check the post-decompression size of ZIP compressed HTTP responses prior to decompressing. This results in the package being vulnerable to a [ZIP bomb](https://en.wikipedia.org/wiki/Zip_bomb) attack, where an extremely small ZIP file becomes many orders of magnitude larger when decompressed. \n\nThis may result in unrestrained CPU/Memory/Disk consumption, causing a denial of service condition.\n\n\n## Recommendation\n\nUpdate to version 3.7.0 or later.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "superagent"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.7.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2017-16129"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/visionmedia/superagent/issues/1259"
  }, {
    "type" : "WEB",
    "url" : "https://en.wikipedia.org/wiki/Zip_bomb"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-8225-6cvr-8pqp"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/advisories/479"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400", "CWE-409" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T21:23:56Z",
    "nvd_published_at" : null
  }
}