How to fix: SOAPAction header injection / SSRF
The SOAPAction header value contains shell/URL metacharacters. If that value is passed verbatim to a downstream HTTP call without validation, attackers can pivot the request to internal services.
Why it matters
An unvalidated SOAPAction header passed to outbound HTTP calls can redirect requests to internal services, cloud metadata endpoints (169.254.169.254), or other hosts the server can reach but the attacker cannot: a Server-Side Request Forgery (SSRF) attack. This finding observes the header value only; it does not confirm the server actually forwards it downstream.
This check inspects the SOAPAction header value for characters that would be dangerous if concatenated into a downstream URL. It does not observe whether the server actually forwards that value anywhere.
How to fix it
- 1Strict-allowlist the SOAPAction value against known operation names
- 2Never concatenate SOAPAction or any user-supplied string into outbound URLs
- 3Use a pre-built SOAP client library that validates operations against the WSDL
Code examples
Node.js: allowlist SOAPAction values
const ALLOWED_SOAP_ACTIONS = new Set([
'http://example.com/GetUserInfo',
'http://example.com/UpdateProfile',
]);
app.post('/soap', (req, res) => {
const action = req.headers['soapaction']?.replace(/"/g, '');
if (!action || !ALLOWED_SOAP_ACTIONS.has(action)) {
return res.status(400).send(
'<soap:Fault><faultcode>Client</faultcode>' +
'<faultstring>Unknown SOAPAction</faultstring></soap:Fault>'
);
}
// Process the allowed action
});References
Detected automatically by VulnRadar. The check id is api-soap-soapaction-injection, stable across every scan so you can filter or diff on it.
More api checks
- LowTRACE method referenced in API response body
- InfoREST endpoint allows DELETE
- LowGraphQL introspection field suggestions
- MediumGraphQL endpoint has no rate-limit headers
- LowOpenAPI server URL leaks internal host
- LowCORS preflight result not cached
- HighBearer token in URL query string
- MediumJSONP callback parameter accepted
Questions
- How severe is SOAPAction header injection / SSRF?
- VulnRadar rates this high severity in the api category. The severity is fixed per check, not scored per site, so the same finding is the same severity on every scan.
- Does VulnRadar check for this automatically?
- Yes. It runs as part of every scan under the check id api-soap-soapaction-injection, which stays the same between runs so you can filter, diff, or gate CI on it.
- Which standards does SOAPAction header injection / SSRF map to?
- It maps to CWE-918. In the OWASP Top 10 it falls under A10:2021.
Missing a check?
The detection set is open. If you know a misconfiguration this does not catch, propose it: the issue template asks for the threat model, how to detect it, the false-positive risk, and a test fixture, which is the same thing a maintainer would have to work out anyway.