{"answers":{"affected":"2 open source packages ship an affected version, including @haxtheweb/haxcms-nodejs.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-46395 exists.","fix":"Upgrade @haxtheweb/haxcms-nodejs to 26.0.0 or later.","what":"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."},"fix_prompt":"Check this codebase for CVE-2026-46395 and fix it if it is affected.\n\nWhat it is: 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.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-46395 exists.\n\nAffected packages and fixed versions:\n- @haxtheweb/haxcms-nodejs (npm): affected all versions; fixed in 26.0.0\n- @haxtheweb/haxcms-nodejs (npm): affected all versions; fixed in 26.0.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-46395/ (Markdown: https://insights.sbomify.com/CVE-2026-46395/index.md)","id":"CVE-2026-46395","markdown":"https://insights.sbomify.com/CVE-2026-46395/index.md","name":"CVE-2026-46395","record":{"aliases":["GHSA-6c8g-9hfh-pq5h"],"analysis":{"component_type":"web_application","fix_type":"upgrade","impacts":["privilege_escalation","data_read"],"network_reachable":"yes","non_default_config":false,"product_category":"HAX CMS Node.js backend","requires_auth":"none","summary":"Unauthenticated attackers can extract the private signing key from Node.js backend tokens to forge admin JWTs and gain full administrative access.","user_interaction":"not_required","vuln_class":"weak_cryptography"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":9.3,"severity":"critical","source":"cna","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","version":"4.0"},"cwes":[{"id":"CWE-327","name":"Use of a Broken or Risky Cryptographic Algorithm"},{"id":"CWE-321","name":"Use of Hard-coded Cryptographic Key"},{"id":"CWE-200","name":"Exposure of Sensitive Information to an Unauthorized Actor"}],"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.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":"2026-06-09","github_poc":1,"max_poc_stars":0,"metasploit":0,"nuclei":0,"refs":[{"date":"2026-06-09T17:19:32Z","kind":"github_poc","ref":"https://github.com/shreyas-challa/CVE-2026-46395-haxcms-hmac-key-leak","stars":0,"title":"PoC and writeup for CVE-2026-46395: unauthenticated private key disclosure via broken HMAC in HAXcms Node.js (CWE-321/CWE-200). Authorized security research only."}],"tier":"weaponised"},"has_fix":true,"headline":"HAX CMS Vulnerable to Private Key Disclosure via Broken HMAC Implementation","id":"CVE-2026-46395","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"weak_cryptography","year":"2026"},"n_packages":2,"n_references":1,"next":{"headline":"HAX CMS has a stored XSS via \u003ciframe\u003e that allows access to sensitive client-side data and account takeover","id":"CVE-2026-46396"},"packages":[{"ecosystem":"npm","fixed":["26.0.0"],"introduced":["0"],"last_affected":[],"package":"@haxtheweb/haxcms-nodejs","purl":null,"source":"GHSA-6c8g-9hfh-pq5h"},{"ecosystem":"npm","fixed":["26.0.0"],"introduced":["0"],"last_affected":[],"package":"@haxtheweb/haxcms-nodejs","purl":"pkg:npm/%40haxtheweb/haxcms-nodejs","source":"GHSA-6c8g-9hfh-pq5h"}],"prev":{"headline":"HAX CMS Vulnerable to Command Injection using Git.php","id":"CVE-2026-46394"},"products":["haxcms-nodejs"],"published":"2026-06-05","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"yes","exploitation":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-06-05","vendors":["haxtheweb"]},"summary":"Unauthenticated attackers can extract the private signing key from Node.js backend tokens to forge admin JWTs and gain full administrative access.","url":"https://insights.sbomify.com/CVE-2026-46395/"}