Summary
A hard-coded JWT signing secret in yeti-platform Yeti allows attackers to generate valid authentication tokens if the default secret is not changed.
When deployments leave YETI_AUTH_SECRET_KEY at its default value (SECRET), an attacker who knows or guesses this value can forge arbitrary JWTs and impersonate legitimate users.
Affected context
This vulnerability affects Yeti deployments that:
- Use JWT-based authentication for users or API clients, and
- Rely on the
YETI_AUTH_SECRET_KEYenvironment variable as the JWT signing key, but - Do not change the default value from
SECRET.
In such setups, the JWT signing key becomes predictable, and any party aware of the default value can create tokens that the application will trust as authentic.
Exploit preconditions
- Attack surface: Yeti web UI and API endpoints that accept JWTs for authentication or authorization.
- Required access: No prior authenticated access is strictly required; knowledge that the instance uses the default secret is sufficient.
- Trigger point: Submission of attacker-crafted JWTs (for example via HTTP Authorization headers, cookies, or API parameters) to endpoints that validate tokens using the default signing secret.
- Why exploitation is possible: The application uses a static, well-known secret (
SECRET) as the JWT signing key when not explicitly overridden. Because this key is hard-coded and public, attackers can generate valid tokens offline and then present them to the server as if they were legitimate.
Why this happens
The root cause aligns with CWE-798: Use of Hard-Coded Credentials.
The application ships with a default JWT signing secret that is simple, static, and publicly known. If operators do not override this value in production, the cryptographic strength of JWT signing collapses because:
- The same secret is used across different deployments.
- The secret is trivial to guess or is disclosed in public source code or documentation.
This pattern treats a hard-coded value as a secret credential, undermining the trust model of token-based authentication and allowing attackers to bypass normal login flows by forging their own tokens.
Potential impact
- Attackers may generate valid JWT tokens and impersonate arbitrary users.
- Attackers could potentially obtain administrator-level access if token claims are not independently constrained.
- Compromise of API access, including reading, modifying, or deleting data exposed through authenticated endpoints.
- Lateral movement within an environment if the compromised instance is trusted by other services based on JWTs.
- Loss of integrity and confidentiality for data managed by the Yeti instance.
General mitigation guidance
Effective mitigation focuses on eliminating predictable secrets and strengthening key management:
- Ensure that
YETI_AUTH_SECRET_KEY(or equivalent JWT signing key) is set to a strong, unique, and randomly generated value in every environment, especially production. - Manage secrets through a dedicated secrets management system rather than embedding them in code, images, or configuration templates.
- Enforce configuration checks or startup guards that refuse to run with known default secrets.
- Rotate JWT signing keys when misconfiguration is discovered, and invalidate existing tokens where supported.
- Restrict token lifetimes and scopes so that any forged token has limited usefulness if a secret is ever exposed.
How teams detect issues like this
Detection typically combines configuration inspection with behavioral monitoring:
- Configuration scanning: Automatically audit deployment manifests, environment variable sets, and container images for the presence of default or weak values such as
SECRETinYETI_AUTH_SECRET_KEY. - Static analysis / policy checks: Implement CI/CD policies that flag use of known default secrets or missing secret overrides in deployment templates and configuration files.
- Runtime checks: Add startup-time assertions that log or fail fast when the authentication secret remains at its default.
- Log analysis: Monitor authentication logs for anomalously successful logins or token validations that do not align with expected user behavior patterns.

