Insertion of Sensitive Information into Log Sourced from Failed Revocation of Tokens

MEDIUM | MARCH 20, 2023 | CVE-2023-20859

Description

In Spring Vault, an application is vulnerable to insertion of sensitive information into a log file when it attempts to revoke a Vault batch token.

Specifically, an application is vulnerable when all of the following are true:

  • The authentication mechanism creates Batch tokens.
  • Usage of LifecycleAwareSessionManager in an imperative-only arrangement.
  • LifecycleAwareSessionManager.destroy() is called by the application or the application shutdown hook
  • The logging level for LifecycleAwareSessionManager or org.springframework.vault.authentication is set at least to WARN or a more detailed logging level.
  • The token revocation fails because either of:
    • A vault error response that batch tokens cannot be revoked
    • An I/O error occurs

An application is not vulnerable if any of the following is true:

  • The application uses ReactiveSessionManager in a mixed reactive/imperative or reactive-only arrangement.
  • LifecycleAwareSessionManager.destroy() is never called by the application or the application shutdown hook
  • The logging level for LifecycleAwareSessionManager or org.springframework.vault.authentication is set to ERROR or higher, such as OFF.
  • The authentication mechanism creates Service tokens.

Affected Spring Products and Versions

Spring Vault:

  • 3.0.0 - 3.0.1
  • 2.3.2 and earlier

Mitigation

Users of affected versions should upgrade to the corresponding fixed version.
Fix versionAvailability
3.0.2OSS
2.3.3OSS

All other users should either use service tokens or increase the logging level to at least ERROR for the org.springframework.vault.authentication.LifecycleAwareSessionManager logger.

No other steps are necessary.

Credit

This issue was identified and responsibly reported by Martin Kiesel.

History

  • 2023-03-20: Initial vulnerability report published.

Get ahead

VMware offers training and certification to turbo-charge your progress.

Learn more

Get support

Tanzu Spring offers support and binaries for OpenJDK™, Spring, and Apache Tomcat® in one simple subscription.

Learn more

Upcoming events

Check out all the upcoming events in the Spring community.

View all