/

CVE-2026-85391

Severity:

CRITICAL RISK

(9.8)

Hardcoded JWT Secret (CWE-798) in Peppermint Service

CVE-2026-85391

Deferred

Vulnerability type

Category:

Hardcoded Credentials

CWE:

CWE-798

Impact:

Authentication Bypass and Account Takeover

Severity:

CRITICAL RISK

(9.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

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

Sources

SourceLink
github.comgithub.com/Peppermint-Lab/peppermint
github.comgithub.com/Peppermint-Lab/peppermint/blob/0.5.5/apps/api/src/lib/jwt.ts
github.comgithub.com/Peppermint-Lab/peppermint/blob/0.5.5/docker-compose.yml
github.comgithub.com/Peppermint-Lab/peppermint/issues/528
vulncheck.comvulncheck.com/advisories/peppermint-through-0.5.5-use-of-hard-coded-jwt-signing-secret-in-docker-compose-yml

Frequently asked

questions

Yes, when protected endpoints accept tokens signed with the exposed secret and the attacker can reach the application over its network interface.

Typically not. Possession of the signing secret may allow an attacker to create accepted session tokens for arbitrary user identities.

Remove the hardcoded secret, provide signing keys through protected secret-management controls, rotate any exposed key, and invalidate tokens associated with it.

Use automated secret scanning, prohibit credentials in source-controlled deployment files, enforce key-rotation policies, and independently validate authorization for sensitive operations.

Find out what's already
exploitable in your codebase.