[0] Application
From the README:
« authentik is an open-source Identity Provider (IdP) for modern SSO. »
A proxy provider in forward auth mode leaves the traffic to an existing reverse
proxy. The reverse proxy asks the outpost for each request and lets the request
through when the answer is 200. For nginx the endpoint is
/outpost.goauthentik.io/auth/nginx, called through auth_request. Since 2026.8
the outpost is part of the Rust binary (src/outpost/proxy). The 2026.5 images
still build the Go outpost (internal/outpost/proxyv2).
The issue is fixed in authentik 2026.8.7 and 2026.5.9, both released on 2026/11/25 with the GitHub advisory GHSA-55mc-jpww-xm3p. It had no CVE number when this page went public, it will be updated if one arrives.
[I] The vulnerability
A) Overview
In nginx forward auth mode the outpost answers 200, which means “authenticated”,
to any request whose forwarded path starts with /outpost.goauthentik.io. The
forwarded path comes from the X-Original-URL header, which the documented nginx
configuration fills with $request_uri, the request line as the client sent it.
nginx itself chooses the location on the normalized path. A path can therefore
start with the prefix for the outpost and point somewhere else for nginx.
/outpost.goauthentik.io/..%2fsecret/ is such a path for 2026.8.6, and so is
/outpost.goauthentik.io//../secret/, which contains no encoded character.
/outpost.goauthentik.io/../secret/ is such a path for 2026.5.8. nginx routes
all of them to the protected location as /secret/, asks the outpost, receives
200 and proxies the request to the backend without any session.
Established by reading the code of both tags and the nginx source, and by running the two URL parsers on these paths. The complete chain was then observed on one deployment of 2026.8.6, as described in D).
B) Required data
The public URL of an application protected by forward auth behind nginx. This
covers the nginx, Nginx Proxy Manager and ingress-nginx configurations of the
documentation, which all send $request_uri in X-Original-URL.
No account and no knowledge of the provider are needed.
C) Explanation
The documented configuration
(website/docs/add-secure-apps/providers/proxy/_nginx_standalone.mdx) protects
the application location and gives the outpost its own location:
auth_request /outpost.goauthentik.io/auth/nginx;
error_page 401 = @goauthentik_proxy_signin;
proxy_set_header X-Original-URL $scheme://$ak_http_host$request_uri;
nginx matches locations against the normalized URI. In
ngx_http_parse_complex_uri (src/http/ngx_http_parse.c) a percent-encoded
character is decoded and then handled by the state machine as if it had been sent
literally, so %2f counts as a slash and ..%2f removes the previous segment.
$request_uri keeps the original text.
2026.8.6 parses the header with the url crate and tests a prefix
(src/outpost/proxy/application/handlers/forward.rs:28-32 and :184-193):
pub(super) fn nginx_forward_url(headers: &HeaderMap) -> EyreResult<Url> {
let original =
header_str(headers, "x-original-url").ok_or_else(|| eyre!("no forward URL found"))?;
Ok(Url::parse(original)?)
}
if app.is_allowlisted(&fwd) {
return Ok(StatusCode::OK.into_response());
}
// Let the outpost's own endpoints (callback, start, ...) through unauthenticated.
if fwd.path().starts_with("/outpost.goauthentik.io") {
return Ok(StatusCode::OK.into_response());
}
The url crate follows the WHATWG URL standard. It resolves .. and %2e%2e,
which is why the plain form does not work on this version. It leaves %2f
encoded and does not treat it as a separator, so ..%2fsecret is one ordinary
segment and the path keeps its prefix.
A doubled slash gives the same result without any encoding. With merge_slashes
at its default, nginx drops the second slash and then resolves .. against the
prefix, so /outpost.goauthentik.io//../secret/ is routed as /secret/. The
WHATWG parser keeps the empty segment between the two slashes and resolves ..
against it, which leaves /outpost.goauthentik.io/secret/. Checked with the URL
parser of Node.js, which follows the same standard, and by reading
ngx_http_parse_complex_uri. Both forms were then observed on the deployment of D).
2026.5.8 parses the header with url.Parse and tests the same prefix
(internal/outpost/proxyv2/application/mode_forward.go:147-152):
if fwd.String() != r.URL.String() {
if strings.HasPrefix(fwd.Path, "/outpost.goauthentik.io") {
a.log.WithField("url", r.URL.String()).Trace("path begins with /outpost.goauthentik.io, allowing access")
return
}
}
url.Parse decodes the path and does not resolve dot segments. Both
/outpost.goauthentik.io/../secret/ and the %2f form give a Path that starts
with the prefix.
After the 200, nginx proxies the main request. With proxy_pass http://app; the
backend receives the path as the client sent it and has to resolve it itself.
With a URI part, as in proxy_pass http://app/;, nginx sends the normalized path
and the backend receives /secret/ directly.
The same gap exists for skip_path_regex. The patterns are matched against the
same parsed path (forward.rs:117, :184 and handlers/proxy.rs), so a pattern
such as ^/public/ also matches /public/..%2fadmin.
D) Exploitation
Observed with the parsers that the two outposts use for this header. Go 1.24.7,
net/url:
/outpost.goauthentik.io/../secret/ -> Path /outpost.goauthentik.io/../secret/ prefix kept
/outpost.goauthentik.io/..%2fsecret/ -> Path /outpost.goauthentik.io/../secret/ prefix kept
WHATWG URL parser (Node 22.23.5, the algorithm that the url crate implements):
/outpost.goauthentik.io/../secret/ -> /secret/ prefix lost
/outpost.goauthentik.io/..%2fsecret/ -> /outpost.goauthentik.io/..%2fsecret/ prefix kept
Requests to send, with a client that does not rewrite the path:
curl --path-as-is -i 'https://app.company/outpost.goauthentik.io/..%2fsecret/' # 2026.8.x
curl --path-as-is -i 'https://app.company/outpost.goauthentik.io//../secret/' # 2026.8.x, no encoded character
curl --path-as-is -i 'https://app.company/outpost.goauthentik.io/../secret/' # 2026.5.x
Expected on a vulnerable setup: the answer of the backend instead of the redirect
to /outpost.goauthentik.io/start.
Observed on a deployment of authentik 2026.8.6 with the embedded outpost, behind
nginx with auth_request and the X-Original-URL header built from
$request_uri. The target was a static file that nginx serves from the protected
location. Requested by its own path with no session, the file answers 302, the
redirect to the sign-in. Requested as /outpost.goauthentik.io/..%2f<path> and
as /outpost.goauthentik.io//../<path> with no session, it answers 200. A unique
query string on each request kept the cache of the CDN in front of the server out
of the result.
The same holds for a dynamic page. In the same server, a PHP script that nginx
passes to FastCGI from an exact-match location carries the same auth_request.
With no session it answers 302 by its own path, and 200 through both forms. Only
GET requests were sent. The nginx version was not recorded.
E) Consequences
Anyone who can reach the reverse proxy can send requests to the protected backend
without a session. What the request reaches depends on the backend. A backend
that decodes %2f and resolves .., for example another nginx, serves the
protected path. With a proxy_pass that has a URI part, every backend does. On
2026.5.x the plain .. form is enough, and most web servers resolve it.
The identity headers are empty on such a request. An application that only relies
on the gate is open. An application that requires X-authentik-username treats
the request as anonymous.
Not tested:
- A proxied backend. The observation used a file that nginx serves itself and a script passed to FastCGI.
- The complete chain on 2026.5.8, for which only the parser was run.
- ingress-nginx, Nginx Proxy Manager and the HAProxy configuration that uses the same endpoint.
- Versions older than 2026.5.8.
- The fixed releases. The fix described in [II] was read in the diff of both tags and was not run.
[II] Mitigation
1. Do not answer 200 on a path prefix. With the documented configuration, a
request for /outpost.goauthentik.io is served by its own location and is never
submitted to auth_request. The allowance is only reached by requests that nginx
routed elsewhere.
2. Compare a canonical path. Where the allowance has to stay, percent-decode
the path, reject it when it contains .., a backslash or an encoded separator,
and require the prefix to end at a segment boundary. Apply the same canonical
path to skip_path_regex.
3. Fix both implementations. The 2026.5 line ships the Go outpost and the 2026.8 line ships the Rust outpost.
The fix in 2026.8.7 and 2026.5.9. The maintainers went for the first two points at once, in both outposts:
handle_nginx(Rust) andforwardHandleNginx(Go) no longer test a prefix, they compare the forwarded path with a fixed list of eight outpost endpoints (/outpost.goauthentik.io/start,/callback,/sign_out,/pingand the four/auth/*ones), so a path that only starts with/outpost.goauthentik.iois handled like any other request.- The Rust outpost also answers 401 when the
X-Original-URLit received contains a.or..segment once percent-decoded (segments are split on\too, and;parameters are dropped). It looks at the header as received, before theurlcrate resolves anything. skip_path_regexrefuses a path with a dot segment before trying the patterns (is_allowlistedinsrc/outpost/proxy/allowlist.rs,IsAllowlistedininternal/outpost/proxyv2/application/mode_common.go), which also covers the proxy mode and the traefik, caddy and envoy endpoints.
The three paths of D) are in the tests shipped with the fix (with about a dozen variants). The advisory of the maintainers gives no workaround and recommends to stop using the nginx forward auth integration until the upgrade is done, so the only thing to do here is to upgrade to 2026.8.7 or 2026.5.9.
[III] Timeline
2026/11/23: Report filed with the authentik security team as a private GitHub advisory 2026/11/25: authentik 2026.8.7 and 2026.5.9 released, GHSA-55mc-jpww-xm3p published 2026/11/27: This page made public
[IV] Author
John JEAN is a French security researcher, CTO at Wargan (https://www.wargan.com).
Follow me on X @johnjean
[V] PGP
My current PGP key is 0xDC3CB82BF0967AF0, you can get it on the Work with me page.