GHSA-G956-2F74-RMV7
Vulnerability from github – Published: 2026-07-31 17:03 – Updated: 2026-07-31 17:03Summary
The hashi-vault-js library is vulnerable to path traversal and query string injection due to the lack of proper encoding of identifiers in path segments and query strings. This allows attackers to manipulate the request URL and potentially access unintended downstream endpoints or inject malicious parameters if untrusted input is passed to the library.
Details
There are zero calls to encodeURIComponent anywhere in Vault.js. Every identifier (e.g., name, username, group, role, version) provided to the library is concatenated straight into the HTTP URL without URI encoding.
Two vectors can be dynamically confirmed:
- Path Traversal: Passing
../../sys/sealas a secret name causes the HTTP client to normalize the path and send the request to/v1/sys/sealinstead of the intended Key-Value path. - Query Injection: Passing
1&list=trueas a version value injects an extra query parameter into the request payload.
Impact
In applications where Vault identifiers originate from untrusted user input, this allows an unauthenticated attacker to redirect requests to unintended Vault endpoints (including administrative paths under sys/) or otherwise alter the executed query, executing operations within the permissions of the Vault token used by the application.
Patches
This vulnerability has been addressed by wrapping path segments with encodeURIComponent() and safely formatting query strings instead of manual string concatenation. Users should upgrade to a version that includes this fix.
Workarounds
If you cannot immediately update the library, you can mitigate this issue by rigidly validating and sanitizing all user-supplied input before passing it into hashi-vault-js methods. Alternatively, manually encode inputs using encodeURIComponent() before supply them to the library's functions.
Acknowledgements
hashi-vault-js would like to thank Sebastián Alba Vives for reporting this vulnerability.
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 0.5.1"
},
"package": {
"ecosystem": "npm",
"name": "hashi-vault-js"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.5.2"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-55100"
],
"database_specific": {
"cwe_ids": [
"CWE-23",
"CWE-74"
],
"github_reviewed": true,
"github_reviewed_at": "2026-07-31T17:03:27Z",
"nvd_published_at": null,
"severity": "HIGH"
},
"details": "## Summary\n\nThe `hashi-vault-js` library is vulnerable to path traversal and query string injection due to the lack of proper encoding of identifiers in path segments and query strings. This allows attackers to manipulate the request URL and potentially access unintended downstream endpoints or inject malicious parameters if untrusted input is passed to the library.\n\n## Details\n\nThere are zero calls to `encodeURIComponent` anywhere in `Vault.js`. Every identifier (e.g., name, username, group, role, version) provided to the library is concatenated straight into the HTTP URL without URI encoding.\n\nTwo vectors can be dynamically confirmed:\n\n1. **Path Traversal:** Passing `../../sys/seal` as a secret name causes the HTTP client to normalize the path and send the request to `/v1/sys/seal` instead of the intended Key-Value path.\n2. **Query Injection:** Passing `1\u0026list=true` as a version value injects an extra query parameter into the request payload.\n\n## Impact\n\nIn applications where Vault identifiers originate from untrusted user input, this allows an unauthenticated attacker to redirect requests to unintended Vault endpoints (including administrative paths under `sys/`) or otherwise alter the executed query, executing operations within the permissions of the Vault token used by the application.\n\n## Patches\n\nThis vulnerability has been addressed by wrapping path segments with `encodeURIComponent()` and safely formatting query strings instead of manual string concatenation. Users should upgrade to a version that includes this fix.\n\n## Workarounds\n\nIf you cannot immediately update the library, you can mitigate this issue by rigidly validating and sanitizing all user-supplied input before passing it into `hashi-vault-js` methods. Alternatively, manually encode inputs using `encodeURIComponent()` before supply them to the library\u0027s functions.\n\n## Acknowledgements\n\nhashi-vault-js would like to thank Sebasti\u00e1n Alba Vives for reporting this vulnerability.",
"id": "GHSA-g956-2f74-rmv7",
"modified": "2026-07-31T17:03:27Z",
"published": "2026-07-31T17:03:27Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/kyndryl-open-source/hashi-vault-js/security/advisories/GHSA-g956-2f74-rmv7"
},
{
"type": "WEB",
"url": "https://github.com/kyndryl-open-source/hashi-vault-js/pull/66"
},
{
"type": "WEB",
"url": "https://github.com/kyndryl-open-source/hashi-vault-js/commit/ea2f76052d366a08f35f62ef4c12b6a334c91ec2"
},
{
"type": "PACKAGE",
"url": "https://github.com/kyndryl-open-source/hashi-vault-js"
},
{
"type": "WEB",
"url": "https://github.com/kyndryl-open-source/hashi-vault-js/releases/tag/v0.5.2"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N",
"type": "CVSS_V4"
}
],
"summary": "hashi-vault-js has a path traversal and query parameter injection"
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.