/

CVE-2026-56265

Severity:

CRITICAL RISK

(9.8)

Hardcoded JWT Signing Key (CWE-798) in Crawl4AI

CVE-2026-56265

Analyzed

Vulnerability type

Category:

Hardcoded Credentials

CWE:

CWE-798

Impact:

Authentication Bypass and Full 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

Crawl4AI's Docker API server uses a hardcoded default JWT signing key, allowing attackers who know this key to forge valid authentication tokens.

Under deployments that retain the default key, an attacker can bypass authentication entirely and gain full access to protected API functionality.

Affected context

This vulnerability arises in Crawl4AI instances where the Docker API server relies on a default, hardcoded JWT signing key for token generation and verification.

It is most relevant in environments where operators deploy the service without rotating or overriding the default key material.

Any context in which the same default key is shared across deployments expands the attack surface, since compromise in one environment can inform attacks on others.

Exploit preconditions

  • Attack surface: Network-exposed Docker API server endpoints that accept JWT-based authentication
  • Required access: Knowledge of the default JWT signing key; no prior authenticated access is required once the key is known
  • Trigger point: Submission of forged JWTs in Authorization headers or equivalent token-bearing mechanisms
  • Why exploitation is possible: The server trusts tokens signed with the static default key, treating them as legitimate for any user identity or role

Why this happens

The core issue is the embedding of a static, hardcoded JWT signing key directly into the application or its default configuration.

This behavior maps to CWE-798: Use of Hard-coded Credentials, where secret material such as keys or passwords is shipped with the product and reused across deployments.

Because the same key is used both to sign and verify tokens, anyone who learns or guesses the key can mint arbitrary tokens that the server will accept as authentic.

Potential impact

  • Full bypass of authentication controls at the Docker API server level
  • Impersonation of any user, including administrative or privileged accounts
  • Unauthorized access to all protected API routes and operational capabilities
  • Potential modification, deletion, or exfiltration of application data
  • Use of the compromised API as a pivot point for broader infrastructure attacks

General mitigation guidance

Effective mitigation focuses on removing reliance on shared, hardcoded secrets and tightening token validation practices.

Recommended defensive patterns include:

  • Externalizing JWT signing keys into secure configuration channels (e.g., environment variables, secret stores) and ensuring they are unique per deployment
  • Enforcing mandatory key rotation and avoiding any fallback to default or sample keys
  • Implementing strict role-based access control so that tokens correspond to minimal necessary privileges
  • Disabling or hardening demo or default configurations in production-like environments to reduce the risk of accidental exposure

These measures reduce the likelihood that a single exposed key can compromise multiple instances or grant unrestricted access.

How teams detect issues like this

Detection typically combines configuration review, code analysis, and runtime monitoring:

  • Static analysis: Search for embedded secret literals, default JWT keys, or constant signing secrets within source code and configuration files.
  • Configuration audits: Verify that production deployments reference environment-specific keys and that no default or sample keys remain enabled.
  • Runtime telemetry: Monitor API access logs for anomalous authentication patterns, such as unknown clients suddenly acquiring broad privileges.
  • Policy enforcement: Integrate checks in CI/CD pipelines that flag hardcoded secrets and prevent merging of changes that reintroduce them.

Sources

SourceLink
github.comgithub.com/unclecode/crawl4ai
github.comgithub.com/unclecode/crawl4ai/security/advisories/GHSA-365w-hqf6-vxfg
vulncheck.comvulncheck.com/advisories/crawl4ai-authentication-bypass-via-hardcoded-jwt-signing-key

Frequently asked

questions

It is broadly exploitable wherever the Docker API server is reachable and the default JWT signing key remains in use.

Anyone who obtains the key can generate tokens without needing an existing account.

The attacker only needs network access to the API and knowledge of the default key.

No prior authentication or local access is required once the key is known or guessed.

Move all secret material, including JWT signing keys, out of code and into secure, per-environment secret management systems.

Ensure each deployment uses unique keys, and disable any default or example credentials in production.

Establish secure development policies that prohibit hardcoded credentials, enforce automated secret scanning in repositories, and require configuration of unique keys during deployment.

Regularly rotate keys and audit configurations to ensure that defaults are never used beyond initial testing.

Find out what's already
exploitable in your codebase.