CVE-2026-46395 HAX CMS Vulnerable to Private Key Disclosure via Broken HMAC Implementation

Critical 9.3 Published Updated

Unauthenticated attackers can extract the private signing key from Node.js backend tokens to forge admin JWTs and gain full administrative access.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-46395?

CVE-2026-46395 is a critical vulnerability in haxtheweb haxcms-nodejs, published on 5 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

HAX CMS helps manage microsite universe with PHP or NodeJs backends. Prior to version 26.0.0, the `hmacBase64()` function in the HAXcms Node.js backend contains two critical cryptographic implementation errors that together allow any unauthenticated attacker to extract the system’s private signing key and forge arbitrary admin-level JSON Web Tokens (JWTs) allowing them to get full admin access with a single HTTP request. First, the function passes the literal string "0" as the HMAC signing key instead of the key parameter, making every HAXcms instance compute identical HMACs for the same input. Then, after computing the HMAC, the function concatenates the real key parameter which is "this.privateKey + this.salt", the system’s master signing secret is directly onto the output. The combined buffer is base64-encoded and returned as the token. Every base64url token produced has the same structure: 32 bytes HMAC keyed with "0" and N bytes of `privateKey+salt`. An attacker base64-decodes any token, discards the first 32 bytes, and reads the private key directly. The `/system/api/connectionSettings` endpoint is unauthenticated and returns multiple tokens generated by this function. A single GET request to this endpoint exposes the private key. The PHP backend implements this function correctly with the actual key and returns only the hash. The PHP version produces 44-character tokens whereas the broken Node.js version produces 139+ character tokens. Version 26.0.0 fixes the issue.

Weakness: CWE-327, CWE-321, CWE-200

Which versions are affected by CVE-2026-46395?

2 open source packages ship an affected version, including @haxtheweb/haxcms-nodejs.

PackageAffectedFixed in
@haxtheweb/haxcms-nodejs npmAll versions26.0.0
@haxtheweb/haxcms-nodejs npmAll versions26.0.0

How do I fix CVE-2026-46395?

Upgrade @haxtheweb/haxcms-nodejs to 26.0.0 or later.

Is CVE-2026-46395 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-46395 exists.

Public exploit code: 1 proofs of concept on GitHub.

Sources

Also known as GHSA-6c8g-9hfh-pq5h.

Is CVE-2026-46395 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free