My First CVE — Denial of Service in HAX CMS
Severity
Moderate · 6.5
Weakness
CWE-20, CWE-476
Affected
@haxtheweb/haxcms-nodejs < 26.0.0
Patched
v26.0.0
As part of a penetration test conducted by the Penn State Competitive Cyber Security Organization, I tested HAX ("Headless Authoring eXperience"), a static site generation platform and content management system. During testing of the NodeJS backend, I discovered a denial of service vulnerability in the site creation endpoint that allows an authenticated user to crash the server process with a single HTTP request. The issue has since been listed in the National Vulnerability Database as a CVE and was patched in version 26.0.0.
The Bug
The createSite endpoint in HAX CMS NodeJS supports importing content from remote sources. When a user sends a site creation request with structure: "import" and a file map, the server enters a remote file handling path that constructs a file object and passes it to HAXCMSFile.save().
The save() function at src/lib/HAXCMSFile.js:25 immediately calls tmpFile.originalname.replace(...). However, the file object constructed during the import flow does not include the originalname property. This results in a TypeError on an undefined value, which is unhandled, the Node.js process crashes, and the application goes offline.
The crash occurs before any outbound HTTP request is made. The server never actually attempts to fetch the remote file; it terminates during property access on the malformed file object. Recovery requires a manual server restart.
This is made more impactful by the fact that HAX CMS allows open user registration. An attacker does not need to compromise existing credentials; they can register an account, authenticate to obtain a JWT, and immediately send the malformed request to bring down the server.
The vulnerable code path is:
system/api/createSite → src/routes/createSite.js:176 → src/lib/HAXCMSFile.js:25
The Flow
- Authenticate and grab a JWT (or register a new account)
- Pull the root token and user token from the
connectionSettingsendpoint - Send a POST to
createSitewith a build object that hasstructure: "import"and a files map pointing to any URL - The server enters the remote file handling path, tries to access
originalnameon a file object that doesn't have it, and crashes
Acknowledgements
Thanks to Bryan Ollendyke and the HAX The Web team for the quick triage, transparent communication, and rapid remediation.
