Vulnerabilities in pkg:npm/zencashjs
PACKAGEGHSA-xfrc-7mj2-5xh9 is a CRITICAL undefined behavior vulnerability (General Security Weakness) affecting Zencashjs libraries in the npm ecosystem. The issue involves undefined behavior in zencashjs. Remediation is available by upgrading affected packages to version 1.2.0.
pkg:npm/zencashjs
Vulnerability advisories affecting package pkg:npm/zencashjs. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-xfrc-7mj2-5xh9 | - | CRITICAL | Undefined Behavior in zencashjs |
GHSA-xfrc-7mj2-5xh9 at a Glance
How to Fix GHSA-xfrc-7mj2-5xh9
To remediate this vulnerability, upgrade all affected Zencashjs dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install zencashjs@1.2.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls zencashjs
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-xfrc-7mj2-5xh9, inspect your project dependencies using npm:
npm ls zencashjs
Analyze the terminal output to locate any version of Zencashjs in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.2.0), your application is affected.
Note: The npm ls zencashjs 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 General Security Weakness. In Zencashjs, 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
GHSA-xfrc-7mj2-5xh9 Affected Zencashjs Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
zencashjs
|
npm |
< 1.2.0
|
1.2.0
|
References
Frequently Asked Questions
What is GHSA-xfrc-7mj2-5xh9?
Which Zencashjs versions are affected?
What version fixes GHSA-xfrc-7mj2-5xh9?
Is zencashjs affected?
What CWE is associated with GHSA-xfrc-7mj2-5xh9?
How can I check npm dependencies for GHSA-xfrc-7mj2-5xh9?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-xfrc-7mj2-5xh9",
"modified" : "2020-08-31T18:44:53Z",
"published" : "2020-09-03T17:14:51Z",
"aliases" : [ ],
"summary" : "Undefined Behavior in zencashjs",
"details" : "Versions of `zencashjs` prior to 1.2.0 may cause loss of funds when used with cryptocurrency wallets. The package relies on a string comparison of the first two characters of a Horizen address to determine the destination address type of a transaction (P2PKH or P2SH). Due to the base58 address prefixes chosen in Horizen there exists the possibility of a clash of address prefixes for testnet P2PKH and mainnet P2SH addresses, testnet P2PKH addresses start with “zt” while a subset of mainnet P2SH addresses can also start with “zt”. The package interprets transactions sent to a “zt” P2SH address on mainnet as P2PKH transactions erroneously. Any funds sent to a mainnet P2SH multisignature address starting with “zt” will be sent to the wrong address and be lost.\n\n\n## Recommendation\n\nUpgrade to version 1.2.0 or later.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "zencashjs"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.2.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/ZencashOfficial/zencashjs/commit/db01bd94b9f8a956d7835e934500eaa643f8bd13#diff-42d8d2088a96641b563b25ad908b0c0fR146"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/1035"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2020-08-31T18:44:53Z",
"nvd_published_at" : null
}
}