GHSA-7cgc-fjv4-52x6: Bignum Malware Vulnerability

CRITICAL
CWE-506
Published
Advisory Summary

GHSA-7cgc-fjv4-52x6 is a CRITICAL malware vulnerability (CWE-506: Embedded Malicious Code) affecting Bignum libraries in the npm ecosystem. The issue involves malware in pre-build binaries of bignum. Remediation is available by upgrading affected packages to version 0.13.1.

GHSA-7cgc-fjv4-52x6 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-7cgc-fjv4-52x6
Severity CRITICAL
CVSS v3.1 Base Score N/A
CWE Classification CWE-506: Embedded Malicious Code
Affected Product Bignum
Package Ecosystem npm
Published Date
Last Updated

How to Fix GHSA-7cgc-fjv4-52x6

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

bignum fixed: 0.13.1
npm install bignum@0.13.1
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 bignum

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-7cgc-fjv4-52x6, inspect your project dependencies using npm:

npm ls bignum

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

Note: The npm ls bignum 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-506: Embedded Malicious Code, where the product contains code that appears to be malicious in nature. In Bignum, 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

### Impact bignum releases from v0.12.2 to v0.13.0 (inclusive) used node-pre-gyp to optionally download pre-built binary versions of the addon. These binaries were published on a now-expired S3 bucket which has since been claimed by a malicious third party which is now serving binaries containing malware that exfiltrates data from the user's computer. ### Patches v0.13.1 does not use node-pre-gyp and does not have support for downloading pre-built binaries in any form, avoiding the risk of malicious downloads.

GHSA-7cgc-fjv4-52x6 Affected Bignum Versions

1 component(s)
Fixed Versions:
0.13.1
Product / Package Ecosystem Affected Versions Fixed Version
bignum
npm
≥ 0.12.2
< 0.13.1
0.13.1

References

Frequently Asked Questions

What is GHSA-7cgc-fjv4-52x6?
GHSA-7cgc-fjv4-52x6 is a security vulnerability in Bignum involving Malware in pre-build binaries of bignum under CWE-506: Embedded Malicious Code.
Which Bignum versions are affected?
Affected versions include releases prior to 0.13.1 across affected packages: bignum.
What version fixes GHSA-7cgc-fjv4-52x6?
Upgrading to 0.13.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is bignum affected?
Yes, bignum is affected in releases prior to 0.13.1. Upgrade your dependency to 0.13.1 or later.
What CWE is associated with GHSA-7cgc-fjv4-52x6?
GHSA-7cgc-fjv4-52x6 is classified under CWE-506: Embedded Malicious Code (The product contains code that appears to be malicious in nature.).
How can I check npm dependencies for GHSA-7cgc-fjv4-52x6?
Run the dependency tree command: 'npm ls bignum'. 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-7cgc-fjv4-52x6",
  "modified" : "2023-05-24T16:43:58Z",
  "published" : "2023-05-24T16:43:58Z",
  "aliases" : [ ],
  "summary" : "Malware in pre-build binaries of bignum",
  "details" : "### Impact\n\nbignum releases from v0.12.2 to v0.13.0 (inclusive) used node-pre-gyp to optionally download pre-built binary versions of the addon. These binaries were published on a now-expired S3 bucket which has since been claimed by a malicious third party which is now serving binaries containing malware that exfiltrates data from the user's computer.\n\n### Patches\n\nv0.13.1 does not use node-pre-gyp and does not have support for downloading pre-built binaries in any form, avoiding the risk of malicious downloads.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "bignum"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.12.2"
      }, {
        "fixed" : "0.13.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/justmoon/node-bignum/security/advisories/GHSA-7cgc-fjv4-52x6"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/justmoon/node-bignum/commit/57e48c3f052249725517415d83c7147e4a8c44c8"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/justmoon/node-bignum/commit/72951c53e7c5c1ac157f04686dc12c3c393b4b08"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/justmoon/node-bignum"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-506" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-05-24T16:43:58Z",
    "nvd_published_at" : null
  }
}