# CVE-2022-31051: Exposure of Sensitive Information to an Unauthorized Actor in semantic-release

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 4.4
- **CVSS:** 4.4 (v3.1, CNA) `CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:N/A:N`
- **CVSS metrics:** Attack vector: Network; Attack complexity: High; Privileges required: High; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: None; Availability impact: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, login needed
- **EPSS:** 1.88% (percentile 80, 2026-11-26)
- **CWE:** CWE-200
- **Aliases:** GHSA-x2pg-mjhr-2m5x
- **Published:** 2022-06-09T20:05:12.000Z
- **Modified:** 2026-06-17T04:44:41.470Z

## Who should check

- Projects that depend on npm package semantic-release (\>= 17.0.4, \< 19.0.3)
- Anyone running semantic-release \>= 17.0.4, \< 19.0.3

## Description

semantic-release is an open source npm package for automated version management and package publishing. In affected versions secrets that would normally be masked by semantic-release can be accidentally disclosed if they contain characters that are excluded from uri encoding by \`encodeURI\`. Occurrence is further limited to execution contexts where push access to the related repository is not available without modifying the repository url to inject credentials. Users are advised to upgrade. Users unable to upgrade should ensure that secrets that do not contain characters that are excluded from encoding with \`encodeURI\` when included in a URL are already masked properly.

## Affected and fixed versions

- npm `semantic-release`: affected \>= 17.0.4, \< 19.0.3; fixed 19.0.3 (osv)
- semantic-release: \>= 17.0.4, \< 19.0.3 (cvelist)

## Mitigation

- Upgrade semantic-release to 19.0.3 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2022-31051. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-31051.md
Affected: semantic-release >= 17.0.4, < 19.0.3
Fixed in: 19.0.3

Steps:
1. Search this machine and project for semantic-release (npm), semantic-release: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2022-31051 being exploited?

There is no confirmed exploitation: CVE-2022-31051 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 1.88% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2022-31051?

Medium: CVSS 4.4 (v3.1, scored by CNA). Remote, login needed. The attack needs conditions outside the attacker's control, which makes it harder.

### Which versions are affected by CVE-2022-31051?

semantic-release \>= 17.0.4, \< 19.0.3.

### Is there a fix for CVE-2022-31051?

Yes. Fixed in 19.0.3. Upgrade semantic-release to 19.0.3 or later.

### How do I check if I'm affected by CVE-2022-31051?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/semantic-release/semantic-release/security/advisories/GHSA-x2pg-mjhr-2m5x>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2022-31051>
- patch: <https://github.com/semantic-release/semantic-release/commit/58a226f29c04ee56bbb02cc661f020d568849cad>
- patch: <https://github.com/semantic-release/semantic-release/pull/2449>
- patch: <https://github.com/semantic-release/semantic-release/pull/2459>
- other: <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURI>
- other: <https://github.com/semantic-release/semantic-release/releases/tag/v19.0.3>
- other: <https://github.com/semantic-release/semantic-release>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2022-31051>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-x2pg-mjhr-2m5x> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2022-31051> · JSON: <https://flawdb.com/api/v1/entries/CVE-2022-31051>
