The vulnerability is a classic clickjacking (UI Redressing) weakness, categorized under CWE-1021. It stems from the HAX CMS application's failure to send an appropriate Content-Security-Policy (CSP) frame-ancestors or X-Frame-Options header. This allows an attacker to embed the HAX CMS pages in an <iframe> on a malicious site, potentially tricking users into performing actions they did not intend to.
The patches address this by adding the necessary headers at the application entry points:
- For
haxcms-nodejs: The fix is in src/app.js, where the helmet security middleware is configured. The frame-ancestors: 'self' directive is added to the CSP, ensuring that only pages from the same origin can frame the application. This is a configuration change that affects the entire application's response headers.
- For
haxcms-php: The fix is in index.php, the main entry point for the PHP version. A header("Content-Security-Policy: frame-ancestors 'none'"); line is added, which completely disallows any framing of the application pages.
The vulnerability is not located in a single, specific function but is a system-wide security misconfiguration in the application's response headers. The identified 'vulnerable functions' represent the global scope or setup routines where this crucial security configuration was missing and subsequently fixed. Any page rendered by the application would have appeared in a runtime profile during exploitation, as the vulnerability is the successful rendering of the page within a malicious iframe.