CVE-2022-31051
JSON

4.4medium

Exposure of Sensitive Information to an Unauthorized Actor in semantic-release

Severity
4.4medium CVSS:3.1 by GitHub_M
Exploit likelihood
1.80% (higher than 79% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-x2pg-mjhr-2m5x

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

Product or packageVersionsReported by
semantic-release semantic-release>= 17.0.4, < 19.0.3CVE List
semantic-release (npm)from 17.0.4 before 19.0.3GitHub Advisory Database
semantic-release_project semantic-releasefrom 17.0.4 before 19.0.3NVD

All scores

GitHub_M4.4medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:N/A:N
GitHub4.4medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:N/A:N
NVD7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
NVD5.0medium CVSS:2.0AV:N/AC:L/Au:N/C:P/I:N/A:N

Classification

CWE-200

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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.

GitHub Advisory Database
Impact

What kind of vulnerability is it? Who is impacted?

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.

Patches

Has the problem been patched? What versions should users upgrade to?

Fixed in 19.0.3

Workarounds

Is there a way for users to fix or remediate the vulnerability without upgrading?

Secrets that do not contain characters that are excluded from encoding with encodeURI when included in a URL are already masked properly.

References

Are there any links users can visit to find out more?

For more information

If you have any questions or comments about this advisory:

NVD (es)

semantic-release es un paquete npm de código abierto para la administración automatizada de versiones y la publicación de paquetes. En versiones afectadas, los secretos que normalmente estarían enmascarados por semantic-release pueden ser revelados accidentalmente si contienen caracteres que están excluidos de la codificación uri por "encodeURI". La ocurrencia es limitada además a contextos de ejecución en los que el acceso push al repositorio relacionado no está disponible sin modificar la url del repositorio para inyectar credenciales. Es recomendado a usuarios actualizar. Los usuarios que no puedan actualizar deben asegurarse de que los secretos que no contengan caracteres excluidos de la codificación con "encodeURI" cuando sean incluidos en una URL ya estén enmascarados correctamente

References

Sources

SourceRecordLicence
CVE ListCVE-2022-31051 changed 2025-04-23CVE Terms of Use
GitHub Advisory DatabaseGHSA-x2pg-mjhr-2m5x changed 2023-11-08CC-BY-4.0
NVDCVE-2022-31051 changed 2026-06-17Public domain