CVE-2026-46395
Beschrijving NL
HAX CMS helpt bij het beheren van microsite-universum met PHP- of NodeJs-backends. Voorafgaand aan versie 26.0.0 bevat de functie `hmacBase64 ()` in de HAXcms Node.js-backend twee kritieke cryptografische implementatiefouten die samen elke niet-geverifieerde aanvaller in staat stellen om de persoonlijke ondertekeningssleutel van het systeem te extraheren en willekeurige JSON Web Tokens (JWT's) op beheerdersniveau te vervalsen, waardoor ze volledige beheerderstoegang kunnen krijgen met één HTTP-verzoek. Ten eerste geeft de functie de letterlijke tekenreeks "0" door als de HMAC-ondertekeningssleutel in plaats van de sleutelparameter, waardoor elke HAXcms-instantie identieke HMAC's berekent voor dezelfde invoer. Vervolgens, na het berekenen van de HMAC, verbindt de functie de echte sleutelparameter "this.privateKey + this.salt", het hoofdondertekeningsgeheim van het systeem bevindt zich rechtstreeks op de uitvoer. De gecombineerde buffer is base64-gecodeerd en geretourneerd als het token. Elk geproduceerde base64url-token heeft dezelfde structuur: 32 bytes HMAC met "0" en N bytes `privateKey +salt`. Een aanvaller base64-decodeert elk token, verwijdert de eerste 32 bytes en leest de privésleutel rechtstreeks. Het eindpunt `/system/api/connectionSettings` is niet geverifieerd en retourneert meerdere tokens die door deze functie zijn gegenereerd. Een enkel GET-verzoek AAN dit eindpunt stelt de privésleutel bloot. De PHP-backend implementeert deze functie correct met de eigenlijke sleutel en retourneert alleen de hash. De PHP-versie produceert tokens van 44 tekens, terwijl de gebroken versie van Node.js meer dan 139 tekens produceert. Versie 26.0.0 lost het probleem op.
Origineel (Engels) tonen
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.