Summary
Peppermint through version 0.5.5 contains a hardcoded JWT signing secret in its Docker Compose configuration. An unauthenticated attacker who obtains the published secret may forge valid session tokens for arbitrary user accounts and access protected endpoints without credentials.
Affected context
The vulnerability occurs in deployments that use the affected Docker Compose configuration with a static JWT signing secret. It becomes risky when the secret is exposed in source code or deployment artifacts and the application accepts tokens signed with that value for session authentication.
Exploit preconditions
- Attack surface: JWT-protected application endpoints
- Required access: No valid account credentials are required if the signing secret is available
- Trigger point: Session-token validation for protected requests
- Why exploitation is possible: The application trusts tokens signed with a secret that is embedded in a publicly obtainable configuration file, allowing forged claims such as arbitrary user identities
Why this happens
The underlying issue is the inclusion of a reusable authentication secret directly in a deployment configuration file. This maps to CWE-798: Use of Hard-coded Credentials, because a fixed credential is embedded in software or deployment artifacts instead of being supplied through a protected secret-management mechanism. Any party who obtains the value may be able to generate credentials accepted by the application.
Potential impact
- Attackers may bypass authentication
- Attackers could impersonate arbitrary user accounts
- Protected endpoints may be accessed without legitimate credentials
- Sensitive application data may be disclosed or modified
- Administrative actions could be performed if privileged identities can be forged
- Session integrity and audit attribution may be compromised
General mitigation guidance
Mitigation generally focuses on removing fixed authentication secrets from source-controlled configuration and reducing trust in exposed credentials.
Common defensive patterns include:
- Supplying signing keys through a dedicated secret-management system or protected runtime environment
- Generating unique, high-entropy secrets per deployment
- Rotating potentially exposed signing keys and invalidating tokens issued with compromised keys
- Separating signing authority from application configuration where practical
- Enforcing strong authorization checks independently of user-controlled token claims
- Applying least privilege to service identities and administrative endpoints
- Preventing secrets from appearing in repositories, images, logs, and rendered deployment manifests
How teams detect issues like this
Detection approaches commonly include:
- Static analysis and secret-scanning rules for JWT keys, signing secrets, and credential-like constants
- Code review checks for authentication material embedded in Compose files, manifests, or application defaults
- Repository and container-image scans for high-entropy strings and known secret formats
- Runtime monitoring for tokens representing unexpected users, privilege transitions, or unusual access patterns
- Policy enforcement that rejects deployment artifacts containing hardcoded credentials
- Review of key rotation, token revocation, and secret-injection controls

