CVE-2026-44883: Portainer: JWT accepted in URL query leaks tokens to logs and referers

Published May 14, 2026
·
Updated

Summary Portainer's authentication middleware accepts JWT bearer tokens passed as the ?token=<JWT> URL query parameter on any authenticated API endpoint, in addition to the standard Authorization: Bearer header. URLs are recorded in reverse-proxy access logs, browser history, and HTTP Referer headers on outbound navigation, so any JWT passed this way can be harvested by anyone with access to those logs or by an external site the user subsequently visits. A leaked token grants the full privileges of the user it was issued to, until the token expires (default 8 hours, configurable).

The ?token= parameter was used by Portainer's browser-based container attach, exec, and pod shell features, so any user with exec or attach rights on a container was exposed — not only administrators.

Severity High

Attack complexity is High because exploitation depends on the attacker obtaining a leaked token from a log, referer, or shared URL. Once obtained, a leaked token grants the privileges of the user it was issued to; for administrator tokens this compromises confidentiality, integrity, and availability of Portainer itself and of every Docker/Kubernetes environment it manages — container exec and stack deployment make host-level compromise reachable, so subsequent-system impact is also High.

Affected Versions Query-parameter token acceptance has existed since JWT authentication was introduced in Portainer.

Fixes are included in the following releases:

| Branch | First vulnerable | Fixed in | |---------------------|------------------|------------| | 2.33.x (LTS) | 2.33.0 | 2.33.8 | | 2.39.x (LTS) | 2.39.0 | 2.39.2 | | 2.40.x (STS) | all prior | 2.41.0 |

Portainer releases prior to 2.33.0 are end-of-life and will not receive a fix. Users on EOL versions should upgrade to a supported LTS branch.

Workarounds Administrators who cannot immediately upgrade can reduce exposure by:

- Stripping ?token= at the reverse proxy. A rewrite rule in nginx, Traefik, or equivalent that removes the token query parameter before the request reaches Portainer blocks the query-parameter auth path entirely. Container exec and interactive shells rely on the query-parameter token for WebSocket upgrade and will stop working until the patched release is deployed. - Auditing existing logs. Search reverse-proxy access logs and application logs for ?token= or &token= occurrences and treat any captured JWT as compromised. Resetting the affected user's password invalidates their sessions; reducing the JWT session timeout in Portainer settings shortens the exposure window for tokens already issued. - Administrator hygiene. Do not share Portainer URLs that contain ?token= in chat, email, or tickets, and avoid navigating to external sites from within the Portainer UI on unpatched instances — the Referer header will carry the token.

None of these replace the fix.

Affected Code Pre-fix, extractBearerToken in api/http/security/bouncer.go read the JWT from the token query parameter before falling back to the Authorization header. The query.Del("token") call scrubs the parameter from r.URL.RawQuery on the way through Portainer, but by that point the original URL has already been recorded by any upstream reverse proxy, access logger, or browser.

go func extractBearerToken(r http.Request) (string, bool) { query := r.URL.Query() token := query.Get("token") if token != "" { query.Del("token") r.URL.RawQuery = query.Encode() return token, true }

tokens, ok := r.Header[jwtTokenHeader] if !ok || len(tokens) == 0 { return "", false } // ... }

The fix removes the query-parameter path entirely. Authenticated requests now carry the JWT via the Authorization header for API clients, or via the portainerapikey HttpOnly cookie for the browser UI — cookies are sent automatically on same-origin WebSocket upgrade requests, so the browser-based container attach, exec, and pod shell features continue to work without exposing the token in the URL. The WebSocket handlers that previously documented ?token= as a required query parameter have been updated to match.

Impact - Token leakage to infrastructure. Intermediate systems that observe the request URL — reverse proxies, load balancers, access logs, WAFs, and corporate network monitoring — capture the full JWT in plaintext. - Token leakage via the browser. URLs containing ?token= are recorded in browser history and forwarded in the Referer header on any outbound navigation from the Portainer UI. - Account takeover. Anyone with access to a leaked JWT acts as the authenticated user for the remainder of the token's validity, without needing the password. If the leaked token belongs to an administrator, the attacker gains full API access including user management, container exec, and stack deployment. - Reach beyond Portainer. Container exec with an administrator JWT reaches the host filesystem of managed environments and can be used to execute commands on those hosts.

Timeline - 2026-03-06: Reported via GitHub Security Advisory by scanpwn. - 2026-04-14: Fix merged to develop. - 2026-04-29: 2.41.0 released. - 2026-05-07: 2.39.2-LTS and 2.33.8-LTS released.

Credit - scanpwn — identified and reported the query-parameter JWT acceptance and the resulting token-leakage vectors.

Other sources

Portainer Community Edition is a lightweight service delivery platform for containerized applications that can be used to manage Docker, Swarm, Kubernetes and ACI environments. From 2.33.0 to before 2.33.8, 2.39.2, and 2.41.0, Portainer's authentication middleware accepts JWT bearer tokens passed as the ?token=<JWT> URL query parameter on any authenticated API endpoint, in addition to the standard Authorization: Bearer header. URLs are recorded in reverse-proxy access logs, browser history, and HTTP Referer headers on outbound navigation, so any JWT passed this way can be harvested by anyone with access to those logs or by an external site the user subsequently visits. A leaked token grants the full privileges of the user it was issued to, until the token expires (default 8 hours, configurable). The ?token= parameter was used by Portainer's browser-based container attach, exec, and pod shell features, so any user with exec or attach rights on a container was exposed — not only administrators. This vulnerability is fixed in 2.33.8, 2.39.2, and 2.41.0.

— MITRE

Affected Software

6 affected componentsFixes available
go/github.com/portainer/portainer>=2.40.0<2.41.0
2.41.0
go/github.com/portainer/portainer>=2.39.0<2.39.2
2.39.2
go/github.com/portainer/portainer>=2.33.0<2.33.8
2.33.8
Portainer Portainer>=2.33.0<2.33.8
Portainer Portainer>=2.34.0<2.39.2
Portainer Portainer>=2.40.0<2.41.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade go/github.com/portainer/portainer to a version that resolves this vulnerability.

    Fixed in 2.41.0
  2. Upgrade

    Upgrade go/github.com/portainer/portainer to a version that resolves this vulnerability.

    Fixed in 2.39.2
  3. Upgrade

    Upgrade go/github.com/portainer/portainer to a version that resolves this vulnerability.

    Fixed in 2.33.8
  4. Upgrade

    Upgrade Portainer to a version that resolves this vulnerability.

    Fixed in 2.33.8
  5. Upgrade

    Upgrade Portainer to a version that resolves this vulnerability.

    Fixed in 2.39.2
  6. Upgrade

    Upgrade Portainer to a version that resolves this vulnerability.

    Fixed in 2.41.0
  7. Configuration

    After a suspected token leak and before/while upgrading, reduce the JWT session timeout in Portainer settings to shorten how long any already-issued JWT remains valid (default 8 hours, configurable).

    Portainer JWT session timeout = Reduce the JWT session timeout in Portainer settings to shorten the exposure window for tokens already issued.
  8. Compensating control

    If immediate upgrade is not possible, implement a reverse-proxy rewrite rule in nginx, Traefik, or equivalent to strip the `token` query parameter (`?token=`) from incoming requests before they reach Portainer, blocking the query-parameter JWT auth path entirely.

  9. Operational

    If a user’s JWT may have been exposed, reset the affected user’s password to invalidate their sessions.

  10. Operational

    Audit logs for potential token compromise: search reverse-proxy access logs and application logs for `?token=` or `&token=` occurrences, and treat any captured JWT as compromised.

  11. Operational

    Administrator hygiene: do not share Portainer URLs containing `?token=` in chat/email/tickets; avoid navigating to external sites from within the Portainer UI on unpatched instances because the `Referer` header will carry the token.

Event History

May 14, 2026
Advisory Published
via GitHub·04:33 PM
Data Sourced
via GitHub·04:33 PM
DescriptionWeaknessAffected Software
May 28, 2026
CVE Published
via MITRE·08:59 PM
Data Sourced
via MITRE·08:59 PM
DescriptionWeakness
Data Sourced
via NVD·10:16 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-44883?

CVE-2026-44883 has been classified with a high severity due to the risk of exposing sensitive authentication tokens in URLs.

2

How do I fix CVE-2026-44883?

To remediate CVE-2026-44883, upgrade Portainer to version 2.41.0, 2.39.2, or 2.33.8 as applicable.

3

What are the affected versions in CVE-2026-44883?

The affected versions of Portainer include those between 2.33.0 and 2.33.8, 2.39.0 and 2.39.2, and 2.40.0 and 2.41.0.

4

What type of vulnerability is CVE-2026-44883?

CVE-2026-44883 is an information exposure vulnerability linked to the improper handling of JWT bearer tokens.

5

What components does CVE-2026-44883 affect?

CVE-2026-44883 specifically affects Portainer's authentication middleware by allowing JWT tokens to be passed via URL parameters.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203