Enabling SSRF protection in n8n

Enabling SSRF protection stops n8n workflows from reaching cloud metadata endpoints and internal services they should not touch. This page covers the settings, allowlists and checks that make it work in your environment.

On this page

Why a self-hosted n8n instance needs SSRF protection

SSRF protection stops n8n workflows from sending requests to addresses the server should never reach, such as cloud instance metadata endpoints, internal admin panels and other services on the private network. On a self-hosted instance you run on servers you control, the HTTP Request node and many other nodes can call any address the host itself can reach. That makes a poorly built or compromised workflow a route into your internal network. Turn SSRF protection on for any instance that runs in a cloud account or inside a network with internal services, and especially for instances that process workflows built by many users or that accept input from outside your organization.

The setting is enabled with N8N_SSRF_PROTECTION_ENABLED, and the n8n documentation describes which address ranges it blocks and how allowlists apply. Confirm the current defaults, blocked ranges and allowlist syntax in the environment variable reference for your exact release before you rely on them, since the list has changed between versions. Your own team should also check which internal APIs legitimate workflows call, because those calls may need explicit exceptions once the protection is active. Test each exception with a real workflow in staging before production.

SSRF protection is one control among several, and it does not replace them. Credentials should be scoped so that a workflow can only perform the actions it needs, network segmentation should limit what the n8n host can reach in the first place, and webhook endpoints need their own authentication. A workflow that can reach an allowed service with a broad token can still cause damage, so plan these controls together. Ask your platform or security team to document the network paths from the n8n host, then compare them with the addresses your workflows actually use.

Which SSRF settings fit which internal traffic

This table compares the main SSRF controls in self-hosted n8n: the on or off switch, the default blocked address ranges, allowlists for internal APIs, and the broader block list in the 3.0 release. Read each row against the internal traffic your workflows actually send, and confirm exact names and values for your version before changing anything.

ControlWhat it controlsWhen it fitsWhat breaks if misused
N8N_SSRF_PROTECTION_ENABLEDTurns on the instance-wide check that stops HTTP-based nodes from calling blocked destinations. Confirm the accepted values in your version's docs.Any instance that runs workflows built by people who are not fully trusted, or any instance holding real credentials.Leaving it off lets a workflow reach cloud metadata endpoints and internal services with the instance's network position.
Default blocked address rangesRefuses requests to link-local, loopback and private ranges that commonly host metadata services and admin consoles. Confirm the exact list for your release.Default posture for production, especially when the host runs in a cloud account with instance metadata.Workflows that call internal databases, monitoring or a private API on a private address fail with blocked-request errors.
Allowlist for internal APIsPermits specific internal hosts or address ranges that legitimate workflows must reach, while the rest of the default block stays in place. Confirm the setting name and format.A known set of internal services such as an ERP or ticketing API that a workflow owner has justified and documented.Broad entries such as a whole private subnet can re-open metadata or admin paths, so the allowlist quietly becomes the attack surface.
Broader block list in 3.0Adds further blocked destinations introduced in the 3.0 release. Confirm the contents against the 3.0 release notes and documentation before upgrading.Teams planning a 3.0 upgrade that want stricter outbound rules by default and have inventoried their HTTP node targets.Upgrading without an inventory can break workflows that previously reached those destinations, and failures may appear only in scheduled runs.
Per-node or per-project exceptionsAny finer-grained policy your version offers for individual nodes or credentials. Confirm whether this exists and where it is configured.Cases where one team needs an internal call that others should not make.If unsupported in your version, teams may widen the instance-wide allowlist instead, which affects every workflow.
Network-level egress rulesFirewall or cloud security group rules applied outside n8n that restrict where the host can connect. Not an n8n setting.Defense in depth, so a missed n8n setting does not expose metadata endpoints.Rules that are too tight can break webhooks, credential tests and community node traffic in ways that look like n8n faults.

How an outbound request from a workflow is checked

The path starts when a trigger runs a workflow, and an HTTP-capable node builds an outbound request. Before anything leaves the instance, the SSRF check evaluates the destination address. Requests to allowed destinations proceed, while requests to internal services or cloud metadata endpoints are blocked unless an allowlist entry explicitly permits them. Check each allowlist entry against the specific service it serves, and confirm the blocked outcome in your own environment before relying on it.

Outbound request path from trigger to destination, with the SSRF check and allowlist.

Setting up SSRF protection and verifying it

This sequence turns on SSRF protection across every n8n process, allows only the internal targets your workflows need, and produces written test results showing that cloud metadata and unapproved internal hosts are blocked. Each step ends with a check you can record and repeat after upgrades.

  1. Confirm the n8n version and protection behavior

    Record the n8n version every process runs, then read the n8n release notes for the version you run and any later version you plan to move to. Confirm which release introduced N8N_SSRF_PROTECTION_ENABLED, the value that enables it, the default blocked ranges in your version, and how allowlist entries are configured. Store these findings with the change record. The check is a short written note listing the version, the blocked-range behavior and the allowlist mechanism, reviewed by the person who owns the instance.

  2. Inventory every internal API workflows call

    Export the workflows and search them for HTTP Request nodes, Code node fetches, community nodes and credentials that point to internal hosts. For each target, record the hostname or IP address, port, path, the workflows that call it, the team that owns it and whether the call is still needed. Include calls that reach private address ranges through public DNS names. The check is an inventory that each workflow owner has reviewed, with no unowned targets left in the list.

  3. Set the protection variable on every process

    Set N8N_SSRF_PROTECTION_ENABLED to the enabled value documented for your version in the environment or container configuration of each main instance, each worker and each webhook processor. In queue mode these are separate processes, and a setting on the main instance alone does not reach them. Keep the value identical across all processes and manage it in the same place as the rest of the configuration, such as your Compose file, Helm values or systemd unit. The check is a command run inside each container or service, such as printenv filtered for the variable name, showing the same value on every process.

  4. Add allowlist entries for approved targets

    Add entries only for the specific internal hosts, ports or paths identified in the inventory and approved by their owners. Avoid broad private network ranges unless the owner has documented a reason, because each broad entry reopens part of the space the protection is meant to close. Confirm the exact allowlist setting name and format in the documentation for your version before editing. Record each entry with its owner and the workflow that needs it. The check is that every entry traces back to one row in the inventory.

  5. Restart all processes and confirm the load

    Restart the main instance, every worker and every webhook processor so that the new variable and allowlist entries load. Restart them in the same change window so that no process runs with the old configuration. Check the startup logs of each process for configuration messages or errors that mention SSRF or allowlist settings. The check is a clean startup on every process and a note of the restart time, which goes into the change record.

  6. Test that a metadata address is blocked

    Create a test workflow in a non-production instance, or in a disabled copy with no real credentials, that uses an HTTP Request node to call the link-local cloud metadata address 169.254.169.254. Run it manually, then trigger it through a webhook and through a queue-mode execution that a worker picks up, so that each process type handles the request. Expected result: the request fails with a protection error and no response body from the metadata service is returned. Record the result for each path. Illustrative note: if a DNS name that resolves to the metadata address is available in your environment, test it as well.

  7. Test approved and unapproved internal calls

    Using the same test workflow, call one approved internal endpoint from the allowlist and expect a normal response with the status code documented by its owner. Then call one internal host that is not on the allowlist and expect a protection error. Run both calls through the manual, webhook and worker paths. Record the target, the path, the expected result and the observed result in a table kept with the change record. Any mismatch means the allowlist or the process configuration needs review before production use.

  8. Retain evidence and repeat checks after changes

    Store the test workflow definitions, the inventory, the allowlist list and the recorded results together. Repeat the metadata and internal call tests after every n8n upgrade, after any change to the protection settings, and whenever a workflow adds a new internal target. Ask your security or compliance reviewers which evidence format they accept before you start, so that the records you keep match the reviews they run. The check is a dated record of a passing test run that matches the current configuration on every process.

Where the check runs and what it cannot see

The check decides based on the address a request actually reaches, not the text of the URL an author typed. A hostname can resolve to a public address during validation and to an internal one when the request connects, which is the basis of DNS rebinding. Redirects add a second path: an allowed URL can answer with a redirect to a link-local or private address, so the check has to run on every hop. Because answers can change between lookups, ask n8n whether validation and connection use the same resolved address in your version. Then test it: point a controlled hostname at a private address with a short TTL, and send an HTTP Request node through a redirect to the metadata endpoint, with N8N_SSRF_PROTECTION_ENABLED set the way you plan to run it.

The control judges where a request goes, not what it carries or who sent it. If a workflow attaches a bearer token or API key to a host on your allowlist, that credential travels to that host in full, and anyone who can edit that workflow's expressions can point the same credential at another allowlisted service. An allowlisted internal API can also be a problem in its own right if it accepts a URL parameter and fetches it server-side, because the request then leaves n8n from a trusted address. Treat each allowlist entry as a trust decision about the service behind it, and confirm which credentials each workflow can read and which hosts it can reach.

Some outbound paths may sit outside the control. The Code node can make network calls from its own runtime, and community nodes bring their own HTTP libraries and may not pass through the same guard. Neither should be assumed covered. Before you rely on the setting, run these checks in a staging instance: a Code node request to the cloud metadata address, a community node request to an internal name, a DNS rebinding test against a domain you control, and a redirect chain through an external test host. Record whether each path is blocked, logged or allowed. For any path that is not covered, restrict it through node policy or network egress rules, and do not trust the setting alone.

Allowlisting internal APIs by deployment model

On a single host, n8n usually runs as one container or process beside its database, reverse proxy and any internal APIs it calls. Internal services often sit on a Docker bridge network, the host network or a private subnet reached through the host's routing table. Every outbound request leaves through the same network namespace, so one allowlist decision applies to the whole instance.

  • Map the container network path: Confirm whether n8n sits on a user-defined bridge, the host network or a custom network, because that decides which private addresses are reachable.
  • Name internal APIs by address: List the hostnames, IPs and ports workflows call, and check whether DNS resolves them to private ranges the protection blocks.
  • Check host-level routing: VPN, overlay or static routes on the host can reach networks that the container does not show in its own configuration.
  • Keep the database and proxy in view: Confirm the PostgreSQL host and reverse proxy addresses are reachable from Code or HTTP nodes only if the design intends it.

Confirm with the platform team which addresses the host can route to, then test each allowlist entry from inside the n8n container.

Risks that remain after SSRF protection is on

Turning on SSRF protection blocks the obvious targets, but it does not decide what a workflow may reach once it is allowed out. The cards below cover the gaps that tend to survive a default setup, and each one maps to a check you can run against your own instance and network.

DNS rebinding and redirect chains

A hostname that passes the check at validation time can resolve to a blocked address when the request is made, and an allowed URL can redirect to an internal one. Check whether the HTTP Request node follows redirects for your workflows and whether your resolver can return different answers to the same name. Test with a hostname you control that changes its record, and confirm that the block still holds at request time. Network-layer egress rules remain the backstop.

Allowlist entries broader than needed

A wide allowlist entry, such as a whole internal subnet or a shared gateway, opens every service behind it rather than the one API a workflow needs. Write entries for exact hosts and ports, and record the owner and purpose of each one. Ask the API team which paths the workflow actually calls, then remove entries that were added for a one-time test.

Credentials sent to an allowed host

An allowed internal API still receives whatever credential the workflow attaches, so a workflow that sends a token to the wrong host, or a redirect that carries headers onward, can leak it. Confirm which credentials each allowed endpoint receives and scope those tokens to that service only. Review expressions that build URLs from user input, because they can change the destination after the credential is chosen.

Code node and community node requests

The Code node and community or custom nodes can make network calls that do not pass through the same HTTP Request node settings you reviewed. Find which nodes on your instance can open sockets or call libraries, and decide whether each one falls under the same policy. Restricting which nodes users can run, and where the Code node executes, closes paths that the HTTP node controls do not cover.

Webhook callers reaching internal paths

A public webhook accepts input from outside, and a workflow that forwards that input into a URL, host field or path can turn the caller into the source of an internal request. Treat webhook payloads as untrusted in every expression that builds a destination. Check each webhook that feeds an HTTP request, and pair the input validation with webhook authentication so unknown callers cannot start the flow.

Drift as new workflows add targets

Each new workflow that calls an internal service can add an allowlist entry or a new egress path, and no one reviews the cumulative list unless a process asks them to. Require a review of allowlist changes when a workflow or node is added, and check the list on a schedule against the services it should reach. Run the same egress test after every n8n upgrade, since default behavior can change between releases.

What buyers ask about SSRF protection in n8n

Is turning on N8N_SSRF_PROTECTION_ENABLED enough to stop SSRF?

No. The setting is one control among several. It helps stop workflows from reaching cloud metadata endpoints and internal services through HTTP-based nodes, but it does not cover webhook exposure, the Code node, credentials that a workflow can reveal, or nodes that call internal systems in other ways. Treat it as a baseline that needs testing. Confirm which address ranges the version you run blocks by default, then verify with a test workflow that a request to a metadata address and to an internal host fails as intended. A penetration test of HTTP nodes is the usual way to confirm the control holds under real workflow logic, including redirects and expressions that build URLs at runtime.

How long does reviewing an SSRF allowlist usually take?

The effort depends on how many workflows call internal services and how well those calls are documented. A small instance with a few known internal APIs is quick to review. A shared instance with many teams, custom nodes and workflows that build URLs from user input takes much longer, because each allowlist entry needs an owner, a justification and a test. The main drivers are the number of internal destinations, whether they use fixed or changing addresses, how often teams add new integrations, and whether you must document each exception for an assessor. Ask any provider for a written effort estimate that lists the workflows reviewed and the destinations tested.

Can a Community edition n8n instance use SSRF protection?

Confirm this against the documentation for the exact version you run before you plan around it. The Community edition is free for self-hosting, and n8n's pricing page lists it as a separate tier from paid plans, but the pricing page does not tie SSRF protection to a specific edition. Check the release notes for the version you are on, look for the environment variable in the configuration reference, and test it on a staging copy. Some controls that matter for hardening sit behind paid plans, such as SSO and LDAP, so do not assume a feature is open to Community users just because the setting exists. Record your findings in the change ticket.

What does our team need to provide before an SSRF review starts?

Prepare three inputs. First, an inventory of every workflow that uses HTTP Request nodes or other nodes that call network addresses, with the owner of each workflow. Second, network diagrams showing where the n8n main instance, workers and webhook processors run, and which internal services, databases and cloud metadata paths they can reach. Third, test accounts and test data for the systems that workflows call, so the review can confirm allowed calls succeed and blocked calls fail without touching production records. Also provide the current n8n version, the deployment method and the list of community or custom nodes in use. Missing inventory is the most common cause of extended scope.

Can our own engineers set up SSRF protection in-house?

Yes, for a small and well-documented instance. The setting itself is a configuration change, and a team with n8n administration experience can apply it in staging. The harder work is the review: finding every legitimate internal call, deciding which ones belong on an allowlist, and proving that blocked requests cannot be reached by a workaround such as a redirect or a URL built from data. In-house teams usually need a second reviewer who did not write the workflows, a repeatable test list and a record of each exception. If your organization must show this work to an auditor or customer, consider an outside test to check your results.

How is a consulting engagement on SSRF protection scoped and quoted?

DeployOpen works from a written scope. Most engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts, and DeployOpen does not publish a price list, so a quote follows from that scope. Ask for a quote that lists the instances covered, the workflows and nodes reviewed, the internal destinations to be tested, the test method, the report format and the retest. Separate one-time work, such as the review and configuration, from recurring work, such as a retainer for allowlist changes after new workflows are added. Ask what the client must provide and what happens if the inventory turns out to be larger than expected.

How should we verify that SSRF blocks metadata and internal targets?

Test with a fixed list rather than ad hoc checks. Build a staging test set that includes the cloud metadata address for your provider, private network ranges used by your internal services, localhost, and hostnames that resolve to internal addresses. Run each one through every HTTP-based node type your team uses, including requests that follow redirects and requests whose URL comes from an expression or an earlier node. Record the expected result for each case, the actual result and the version tested. Repeat the list after each n8n upgrade and after every change to the allowlist, because a new node or a new internal API can open a path that was blocked before.

Limits to confirm in your environment

SSRF protection in n8n depends on the exact version, the blocked ranges that version ships with, and how the control reaches every node and runtime you run. Treat each card below as a check to complete in staging, not an assumption to carry into production.

Setting name and accepted values

Confirm the exact spelling of N8N_SSRF_PROTECTION_ENABLED and which values your installed version accepts before you write it into a compose file or Helm values. Settings can change between releases, so a value that works in one version may be ignored in another. Check the environment variable reference and release notes for the version you run, then confirm the setting appears in the running process configuration. A silent typo leaves the instance unprotected without any error.

Latest cited release
2.43
n8n release notes

Default blocked ranges and the 3.0 change

Find out which address ranges the default block list covers, including link-local metadata addresses, loopback and private networks. Then confirm whether the list changes in 3.0, since a larger block list can break workflows that call internal services today. Ask your team to list every internal hostname that workflows depend on and test each one against the release you plan to run. Record the result so the upgrade does not surprise the workflow owners.

Coverage across outbound node types

Confirm whether the control applies to every node that makes outbound requests, not only the HTTP Request node. Nodes that wrap vendor SDKs, community nodes and Code node scripts that call fetch or other libraries may follow different code paths. Build a test workflow for each node family your users rely on, point it at a metadata endpoint in a lab network, and record whether the request is blocked. Repeat the test after every node or version update.

Queue mode and custom node behavior

Confirm that the setting reaches worker and webhook processor containers, since executions in queue mode run outside the main instance. Each process needs the same configuration, and a worker started with stale values can allow requests the main instance would block. Custom nodes that you build or install also need a direct test, because they may bypass the shared request helpers. Verify both in staging with a worker running, using the same network path that production uses.

Queue mode docs

How DeployOpen scopes and delivers SSRF protection

DeployOpen treats SSRF protection for n8n as a scoped change to your own instance, not a generic setting. We map which workflows call internal and cloud addresses, agree the controls in writing, build and test them in your environment, and hand over the configuration with documentation your team can run and audit.

How we scope

  • Inventory every HTTP Request and node path that reaches internal hosts, cloud metadata addresses or private ranges.
  • Agree in writing which internal APIs need allowlist entries and who approves each destination.
  • Confirm the n8n version, deployment model and whether queue mode workers also need the protection.
  • Engagements are fixed-scope, with deliverables and timelines agreed before work starts.

How we build

  • Enable N8N_SSRF_PROTECTION_ENABLED in your staging instance and record the default blocked ranges.
  • Configure allowlists for legitimate internal APIs, limited to the minimum hosts and ports each workflow needs.
  • Test blocked requests to metadata endpoints and private addresses from real workflow nodes before promotion.
  • Review the block list against the version you run, including any changes planned for the 3.0 release line.

How we hand over

  • Deliver the final configuration, allowlist register and the reasoning behind each allowed destination.
  • Document the test cases, expected results and the steps to repeat them after an upgrade.
  • Walk your platform and security teams through the change, the owners of each allowlist entry and the rollback path.
  • Record the evidence your compliance and security reviewers will ask for about outbound request controls.

How we support

  • Support is available as a retainer for allowlist changes, upgrades and repeated SSRF testing.
  • Retesting covers new workflows and nodes that reach internal networks after your team adds them.
  • Upgrades are checked against the block list and allowlists before your production instance moves.
  • Ask for the retainer scope, response expectations and included retests in the written quote.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.