Skip to main content
HighAPIOWASP A10:2021CWE-918

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

  1. 1Strict-allowlist the SOAPAction value against known operation names
  2. 2Never concatenate SOAPAction or any user-supplied string into outbound URLs
  3. 3Use a pre-built SOAP client library that validates operations against the WSDL

Code examples

Node.js: allowlist SOAPAction values

JavaScript
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.

See every api check

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.

Propose a checkHow a check is built

Scan your own site for soapaction header injection / ssrf

VulnRadar runs this check and hundreds more against a URL in seconds. No agent to install, just paste a URL.

Or scan this site as a demoRead the docs

How to fix: SOAPAction header injection / SSRF | VulnRadar