CVE-2026-40091 Overview
SpiceDB is an open source database system for creating and managing security-critical application permissions. A sensitive information disclosure vulnerability exists in SpiceDB versions 1.49.0 through 1.51.0 where the application logs plaintext database credentials during startup when configured with the info log level. The vulnerability occurs because the startup "configuration" log includes the full datastore Data Source Name (DSN), including plaintext passwords, inside the DatastoreConfig.URI field.
Critical Impact
Database credentials exposed in plaintext within application logs can be harvested by attackers with local access or log aggregation system access, potentially leading to unauthorized database access and data breaches.
Affected Products
- SpiceDB version 1.49.0
- SpiceDB version 1.50.0
- SpiceDB version 1.51.0
Discovery Timeline
- 2026-04-15 - CVE CVE-2026-40091 published to NVD
- 2026-04-15 - Last updated in NVD database
Technical Details for CVE-2026-40091
Vulnerability Analysis
This vulnerability is classified under CWE-532 (Insertion of Sensitive Information into Log File), a common weakness where applications inadvertently write sensitive data to log files. The issue affects SpiceDB's startup logging mechanism when the application is configured to run with the info log level.
During application initialization, SpiceDB logs configuration details to help administrators verify proper setup. However, the logging implementation in affected versions fails to sanitize the DatastoreConfig.URI field before writing it to logs. This field contains the complete database connection string, which typically includes authentication credentials such as usernames and passwords in plaintext format.
The vulnerability requires local access to the system where SpiceDB logs are stored or access to any centralized logging infrastructure that aggregates these logs. While this limits the attack surface compared to network-exploitable vulnerabilities, the sensitive nature of database credentials makes this a significant security concern.
Root Cause
The root cause of this vulnerability lies in insufficient log sanitization within SpiceDB's configuration logging routine. When SpiceDB starts with the info log level, it outputs the full datastore configuration including the URI parameter. The DatastoreConfig.URI field was not being properly redacted or masked before being written to the log output, resulting in plaintext credential exposure.
Attack Vector
The attack vector for this vulnerability is local, requiring an attacker to have access to the system's log files or log aggregation services. Potential attack scenarios include:
A malicious insider or compromised service account with read access to SpiceDB's log directory could extract database credentials directly from the log files. Additionally, if logs are forwarded to centralized logging systems (such as ELK stack, Splunk, or cloud logging services), credentials could be exposed to a broader audience with access to those systems.
The exploitation does not require special privileges beyond log file read access, making it a concern in multi-tenant environments or systems with shared log infrastructure.
Detection Methods for CVE-2026-40091
Indicators of Compromise
- Review SpiceDB log files for entries containing DatastoreConfig.URI with visible password parameters
- Search log aggregation systems for patterns matching database connection strings with authentication details
- Audit access logs to identify unauthorized access to SpiceDB log files or directories
Detection Strategies
- Implement log monitoring rules to detect database connection strings containing password parameters
- Configure SIEM alerts for patterns matching DSN formats (e.g., postgres://user:password@host)
- Perform regular audits of log file permissions to ensure principle of least privilege
Monitoring Recommendations
- Monitor file access events on SpiceDB log directories for suspicious read operations
- Track authentication attempts to databases connected to SpiceDB for anomalous access patterns
- Implement log file integrity monitoring to detect unauthorized log access or modification
How to Mitigate CVE-2026-40091
Immediate Actions Required
- Upgrade SpiceDB to version 1.51.1 or later immediately
- Rotate all database credentials that may have been exposed in logs
- Review and purge historical log files that may contain plaintext credentials
- Audit log file access to identify potential credential exposure
Patch Information
The SpiceDB development team has addressed this vulnerability in version 1.51.1. The fix ensures that sensitive credential information is properly redacted from configuration logs during startup. Users should upgrade to this version as soon as possible. For detailed release information, see the GitHub Release v1.51.1 and the GitHub Security Advisory GHSA-jf4f-rr2c-9m58.
Workarounds
- Change the SpiceDB log level to warn or error to prevent the configuration log from being written
- Restrict file system permissions on log directories to limit access to authorized personnel only
- Implement log redaction at the infrastructure level to mask sensitive patterns before storage
- Consider using environment variables or secret management solutions for database credentials
# Configuration example
# Change log level to prevent credential exposure
spicedb serve --log-level=warn
# Or using environment variable
export SPICEDB_LOG_LEVEL=warn
spicedb serve
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

