CVE-2026-55102: Npm/hashi-vault-js vulnerability
Summary
Vault token and secret values are exposed in thrown errors when using hashi-vault-js.
Details
Every API method in Vault.js executes throw parseAxiosError(err), which returns the raw AxiosError untouched. That error carries the full Axios configuration, including the X-Vault-Token header and the request body. Consuming applications that log caught errors (e.g., using console.error, pino, winston, Sentry, or APMs) inadvertently log the live Vault token in plaintext. Furthermore, write-path methods expose submitted passwords and secret values via err.config.data.
Impact
When consuming applications log intercepted exceptions, sensitive credentials such as tokens, passwords, and secrets are unknowingly exposed to application logs, monitoring services, and APM systems via the raw AxiosError. This may lead to authorization bypass or unauthorized access to the underlying Vault instance.
Patches
This vulnerability should be addressed by redacting err.config.headers['X-Vault-Token'] and err.config.data before re-throwing, or by throwing a purpose-built error containing only safe properties like status and message. Users should upgrade to a version that includes this fix.
Workarounds
If users cannot immediately update the library, they can mitigate this issue by capturing all exceptions thrown by hashi-vault-js and sanitizing or omitting the err.config object before passing the errors to logging utilities or crash reporters.
Acknowledgements hashi-vault-js would like to thank Sebastián Alba Vives for reporting this vulnerability.
Resources
- CWE-532: Insertion of Sensitive Information into Log File - CWE-209: Generation of Error Message Containing Sensitive Information
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
npm/hashi-vault-jsto a version that resolves this vulnerability.Fixed in 0.5.2 - Compensating control
If you cannot immediately update hashi-vault-js, capture and sanitize exceptions thrown by hashi-vault-js before sending them to logging/crash reporters: redact err.config.headers['X-Vault-Token'] and omit/redact err.config.data (and/or throw a new error that includes only safe properties like status and message).
Event History
Frequently Asked Questions
What is the severity of CVE-2026-55102?
The severity of CVE-2026-55102 is rated at 65, indicating a moderate risk.
What are the potential impacts of CVE-2026-55102?
CVE-2026-55102 exposes sensitive Vault token and secret values in error messages, which can lead to unauthorized access.
How do I fix CVE-2026-55102?
To fix CVE-2026-55102, ensure that error handling in your application does not disclose sensitive information by modifying how errors are thrown and logged.
Which software is affected by CVE-2026-55102?
CVE-2026-55102 affects the npm package 'hashi-vault-js'.
When was CVE-2026-55102 published?
CVE-2026-55102 was published on August 13, 2026.