/

CVE-2024-46508

Severity:

HIGH RISK

(7.5)

Use of Hard-Coded Credentials in yeti-platform Yeti

CVE-2024-46508

Analyzed

Vulnerability type

Category:

Use of Hard-Coded Credentials

CWE:

CWE-798

Impact:

Authentication Bypass / Account Impersonation

Severity:

HIGH RISK

(7.5)

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

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_KEY environment 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 SECRET in YETI_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.

Sources

SourceLink
rhinosecuritylabs.comrhinosecuritylabs.com/research/cve-2024-46507-yeti-server-side-template-injection-ssti/
github.comgithub.com/RhinoSecurityLabs/CVEs/tree/master/CVE-2024-46507

Frequently asked

questions

The issue can be exploited wherever a Yeti deployment is accessible and still uses the default JWT secret. Anyone who can reach the service and knows or guesses that the secret is SECRET can forge tokens and gain unauthorized access.

Not necessarily. If the deployment is reachable over the network and uses the default secret, an attacker does not need prior credentials. They only need to construct JWTs signed with the known secret value.

Replace the default JWT secret with a strong, randomly generated value managed via a secure secrets system. Enforce configuration safeguards so the application cannot run with default or weak secrets, and rotate keys if there is any chance the previous secret was exposed.

Avoid hard-coded or trivial default secrets in any authentication mechanism, adopt secure defaults that require explicit secret configuration, integrate secret validation into deployment pipelines, and regularly audit configurations for weak or reused keys.

Find out what's already
exploitable in your codebase.