/

CVE-2026-64682

Severity:

CRITICAL RISK

(9.8)

Hard-Coded JWT Secret (CWE-321) in AstroBlocks CMS

CVE-2026-64682

Deferred

Vulnerability type

Category:

Hard-Coded Cryptographic Key

CWE:

CWE-321, CWE-798

Impact:

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

AstroBlocks used a publicly readable fallback JWT secret because its environment variable name was mismatched, allowing attackers to forge admin session tokens. A forged token claiming the owner role could grant full administrative control when accepted by a vulnerable CMS deployment.

Affected context

The issue affects AstroBlocks deployments before the fix where admin sessions rely on JWT signing and the expected environment variable does not provide the intended secret. In that condition, the application can fall back to a hard-coded value available in the published package, making it possible to forge tokens accepted by the CMS.

Exploit preconditions

  • Attack surface: The AstroBlocks administrative interface and its session-token handling.
  • Required access: Knowledge of the public fallback secret; no legitimate owner credentials are necessarily required.
  • Trigger point: The CMS accepts a forged JWT as an admin session.
  • Why exploitation is possible: A hard-coded fallback signing key, combined with the environment variable name mismatch, can leave token verification dependent on a value an attacker can obtain.

Why this happens

A signing secret was embedded as a fallback in the application, and a mismatched environment variable name could prevent deployments from using the intended secret. This maps primarily to CWE-321: Use of Hard-coded Cryptographic Key and is also related to CWE-798: Use of Hard-coded Credentials. Treating a known, package-visible value as a JWT trust anchor makes it possible to forge tokens that the application may accept.

Potential impact

  • Attackers may gain owner-level administrative access.
  • They could create, modify, or delete content, users, media, redirects, and configuration.
  • A compromised CMS could be used to publish malicious content or disrupt site operations.

General mitigation guidance

Defensive patterns include removing hard-coded signing secrets and avoiding insecure fallback values. Require a strong, deployment-specific secret through a correctly named configuration setting, and fail closed when required secrets are missing or invalid. Limit administrative privileges, protect secret storage and access, and provide a way to rotate signing keys and invalidate existing sessions.

How teams detect issues like this

  • Use static analysis and secret-scanning rules to identify hard-coded JWT secrets and fallback key constants.
  • Review configuration code for mismatches between documented environment variable names and the names actually read at runtime.
  • Check whether missing or invalid secrets cause startup to fail safely rather than select a public default.
  • Enforce code-review or CI policies that prohibit embedded credentials and require secure secret configuration.

Sources

SourceLink
github.comgithub.com/NauelG/astro-blocks/commit/fd83bf0b37a756363f718e134c16e448da09a74d
github.comgithub.com/NauelG/astro-blocks/pull/51
github.comgithub.com/NauelG/astro-blocks/releases/tag/v3.4.0
github.comgithub.com/NauelG/astro-blocks/security/advisories/GHSA-mfcg-m7j5-7v72

Frequently asked

questions

It may be exploitable over the network if an attacker can reach the CMS interface that accepts admin session tokens.

The described issue does not necessarily require valid owner credentials. The key prerequisite is knowledge of the public fallback secret and a deployment that accepts tokens signed with it.

Remove hard-coded fallback secrets, require a strong deployment-specific signing key, and fail closed if that key is unavailable or invalid.

Scan for embedded secrets, test configuration handling for name mismatches and missing values, and enforce secure secret-management and least-privilege policies.

Find out what's already
exploitable in your codebase.