Summary
A server-side request forgery vulnerability in n8n allows authenticated users to bypass Allowed HTTP Request Domains restrictions via the /rest/dynamic-node-parameters/options endpoint.
When an attacker has access to stored credentials, they can trick the n8n server into sending authenticated HTTP requests to unauthorized hosts, enabling credential exfiltration and exposure of sensitive authentication data.
Affected context
This vulnerability affects n8n deployments where workflows rely on stored credentials and the server exposes the /rest/dynamic-node-parameters/options endpoint to authenticated users.
It is most relevant in environments that depend on Allowed HTTP Request Domains to constrain outbound connections, but where these controls are enforced inconsistently across dynamic parameter resolution.
The issue arises when the server constructs outbound HTTP requests using trusted credentials to destinations that have not been properly validated against the allowed domain list.
Exploit preconditions
- Attack surface: HTTP API endpoint
POST /rest/dynamic-node-parameters/optionsreachable by authenticated users. - Required access: Valid authenticated user account with the ability to reference or use stored credentials within n8n.
- Trigger point: Submission of crafted dynamic-node parameter options that cause the server to issue outbound requests using existing credentials.
- Why exploitation is possible: The endpoint allows construction of server-side HTTP requests that are not fully constrained by the Allowed HTTP Request Domains configuration, enabling requests with attached credentials to attacker-controlled or unauthorized hosts.
Why this happens
The root cause lies in incomplete enforcement of outbound request domain restrictions for dynamic node parameter resolution.
The affected endpoint can initiate server-side HTTP requests using stored credentials but fails to consistently validate target hosts against the configured Allowed HTTP Request Domains.
This maps to CWE-918: Server-Side Request Forgery (SSRF), where untrusted input controls how a server connects to external resources, inadvertently allowing attackers to pivot through the application's outbound connectivity and attached authentication material.
Potential impact
- Attackers may exfiltrate API keys, tokens, or other stored authentication credentials.
- Sensitive third-party service data could be exposed through unauthorized authenticated requests.
- Compromise of integrations that rely on n8n-managed credentials.
- Potential escalation to broader account or infrastructure access if reused credentials are obtained.
General mitigation guidance
Mitigation generally centers on tightening outbound request controls and separating trust boundaries for credential use.
Recommended patterns include:
- Ensuring all endpoints that can trigger outbound HTTP requests consistently enforce Allowed HTTP Request Domains or equivalent allowlists.
- Decoupling credential storage from arbitrary user-controlled request destinations, so credentials are only used with vetted hosts and well-defined workflows.
- Applying least-privilege principles to credentials by scoping their permissions and rotating them regularly.
- Introducing defensive validation for dynamic parameters that might influence URLs, hosts, or connection targets before any outbound requests are made.
- Logging and monitoring outbound authenticated requests to detect unusual destinations or patterns.
How teams detect issues like this
Detection efforts can focus on both application behavior and code patterns:
- Reviewing API handlers and dynamic parameter resolution logic for instances where user-supplied data influences outbound request URLs or hosts without strict validation.
- Using static analysis or linters to flag code paths that construct HTTP clients or requests based on untrusted inputs and bypass central domain-allowlist checks.
- Implementing policy checks in code review to ensure all outbound requests use shared validation utilities and that credentials are only bound to known service domains.
- Monitoring logs for outbound requests to unexpected domains, especially those including authentication headers or tokens.

