CVE-2020-26226: Semantic release Secret Disclosure When Containing Characters Vulnerability
HIGHCVE-2020-26226 is a HIGH (CVSS 8.1) secret disclosure when containing characters vulnerability (CWE-116: Improper Encoding or Escaping of Output) affecting Semantic release libraries in the npm ecosystem. The issue involves secret disclosure when containing characters that become uri encoded. Remediation is available by upgrading affected packages to version 17.2.3.
CVE-2020-26226 at a Glance
Security Impact
CVSS: 8.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N).
How to Fix CVE-2020-26226
To remediate this vulnerability, upgrade all affected Semantic release 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 semantic-release@17.2.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls semantic-release
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2020-26226, inspect your project dependencies using npm:
npm ls semantic-release
Analyze the terminal output to locate any version of Semantic release in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 17.2.3), your application is affected.
Note: The npm ls semantic-release 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-116: Improper Encoding or Escaping of Output, where the product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. as a result, the intended structure of the message is not preserved. In Semantic release, 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
CVE-2020-26226 Affected Semantic release Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
semantic-release
|
npm |
< 17.2.3
|
17.2.3
|
References
Frequently Asked Questions
What is CVE-2020-26226?
Which Semantic release versions are affected?
What version fixes CVE-2020-26226?
Is semantic-release affected?
What is the CVSS score of CVE-2020-26226?
What CWE is associated with CVE-2020-26226?
How can I check npm dependencies for CVE-2020-26226?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-r2j6-p67h-q639",
"modified" : "2021-01-07T22:41:34Z",
"published" : "2020-11-18T21:19:14Z",
"aliases" : [ "CVE-2020-26226" ],
"summary" : "Secret disclosure when containing characters that become URI encoded",
"details" : "### Impact\n\nSecrets that would normally be masked by `semantic-release` can be accidentally disclosed if they contain characters that become encoded when included in a URL.\n\n### Patches\n\nFixed in v17.2.3\n\n### Workarounds\n\nSecrets that do not contain characters that become encoded when included in a URL are already masked properly.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "semantic-release"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "17.2.3"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 17.2.2"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/semantic-release/semantic-release/security/advisories/GHSA-r2j6-p67h-q639"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-26226"
}, {
"type" : "WEB",
"url" : "https://github.com/semantic-release/semantic-release/commit/ca90b34c4a9333438cc4d69faeb43362bb991e5a"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-116" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2020-11-18T21:18:55Z",
"nvd_published_at" : null
}
}