CVE-2020-26226: Semantic release Secret Disclosure When Containing Characters Vulnerability

HIGH
Advisory Identifier: GHSA-r2j6-p67h-q639
CVSS 8.1
CWE-116
Published
Advisory Summary

CVE-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

CVE Identifier CVE-2020-26226
GHSA Identifier GHSA-r2j6-p67h-q639
Severity HIGH
CVSS v3.1 Base Score 8.1
CWE Classification CWE-116: Improper Encoding or Escaping of Output
Affected Product Semantic release
Package Ecosystem npm
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (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.

semantic-release fixed: 17.2.3
npm install semantic-release@17.2.3
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 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

### Impact Secrets that would normally be masked by `semantic-release` can be accidentally disclosed if they contain characters that become encoded when included in a URL. ### Patches Fixed in v17.2.3 ### Workarounds Secrets that do not contain characters that become encoded when included in a URL are already masked properly.

CVE-2020-26226 Affected Semantic release Versions

1 component(s)
Fixed Versions:
17.2.3
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?
CVE-2020-26226 is a security vulnerability in Semantic release involving Secret disclosure when containing characters that become URI encoded under CWE-116: Improper Encoding or Escaping of Output.
Which Semantic release versions are affected?
Affected versions include releases prior to 17.2.3 across affected packages: semantic-release.
What version fixes CVE-2020-26226?
Upgrading to 17.2.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is semantic-release affected?
Yes, semantic-release is affected in releases prior to 17.2.3. Upgrade your dependency to 17.2.3 or later.
What is the CVSS score of CVE-2020-26226?
CVE-2020-26226 has a CVSS v3.1 base score of 8.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2020-26226?
CVE-2020-26226 is classified under CWE-116: Improper Encoding or Escaping of Output (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.).
How can I check npm dependencies for CVE-2020-26226?
Run the dependency tree command: 'npm ls semantic-release'. 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-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
  }
}