Summary
MaxKey contains a hard-coded JWT signing secret that can allow unauthenticated attackers to forge tokens accepted by the password-skipped login flow. Under deployments that retain the publicly known default secret, an attacker may authenticate as another user, including an administrator, and access SSO configuration and downstream application secrets.
Affected context
The vulnerability occurs in MaxKey deployments where the JWT signing secret remains embedded in application configuration and is shared or predictable across installations. Risk is greatest when the JWT trust-login endpoint accepts tokens signed with that secret and the resulting session provides administrative access to SSO settings or connected application credentials.
Exploit preconditions
- Attack surface: The MaxKey JWT trust-login endpoint exposed by the SSO service
- Required access: No prior authentication may be required when the endpoint accepts forged tokens
- Trigger point: Authentication of a JWT through the password-skipped login flow
- Why exploitation is possible: The application trusts tokens signed with a hard-coded, publicly discoverable secret, allowing token authenticity to be forged
Why this happens
The underlying flaw is the use of a hard-coded JWT signing secret in application configuration. Because the secret is fixed and may be known to anyone who can inspect the software or its defaults, an attacker can create tokens that pass signature validation without possessing legitimate credentials. This maps to CWE-798: Use of Hard-coded Credentials, with the hard-coded secret functioning as a shared authentication credential.
Potential impact
- Unauthenticated attackers may bypass normal login controls
- Attackers could impersonate users or administrators
- Administrative SSO application settings may be exposed or modified
- Downstream application secrets may be disclosed
- Connected applications and user accounts may be affected through the compromised SSO trust relationship
General mitigation guidance
Mitigation generally focuses on removing fixed authentication secrets from application code and default configuration, then establishing a controlled secret lifecycle.
Common defensive patterns include:
- Generate a unique, high-entropy signing key for each deployment
- Store signing keys in a protected secret-management system rather than source-controlled or distributable configuration
- Require explicit secret initialization and fail securely when a safe key is absent
- Rotate signing keys using controlled key-management and token-expiration policies
- Restrict administrative permissions and downstream secret visibility according to least privilege
- Review and invalidate sessions or tokens that may have been created with a compromised signing key
How teams detect issues like this
Organizations can identify this class of issue through:
- Static analysis and secret-scanning rules for JWT secrets, signing keys, and credential-like constants
- Code review checks for default secrets in configuration templates, properties files, and container images
- Tests that verify authentication fails when deployment-specific signing secrets are missing or unchanged
- Configuration-policy enforcement requiring externally managed, unique secrets for each environment
- Monitoring for unusual JWT authentication activity, administrative logins, and access to downstream application credentials
- Automated security review tools that flag hard-coded credentials and password-skipped authentication paths

