🛡️ CVE-2026-56813 — plug
Description
Cookie attribute injection in Plug.Conn.Cookies.encode/2
Summary
Improper Neutralization of Parameter/Argument Delimiters vulnerability in elixir-plug plug allows an attacker to inject or override HTTP cookie attributes.
The Plug.Conn.Cookies.encode/2 function in lib/plug/conn/cookies.ex builds the Set-Cookie response header by interpolating the cookie value and its path, domain, same\_site, and extra attributes directly into the header without neutralizing the ';' delimiter that separates cookie attributes.
An application that places attacker-controlled data into a cookie value or attribute (for example via Plug.Conn.put\_resp\_cookie/4 when reflecting a username or preference) lets an attacker inject a ';' to append or override cookie attributes (such as Domain and Path scope, or dropping the Secure and HttpOnly flags), enabling cookie tossing and session fixation. Carriage return, line feed, and null bytes are rejected by Plug.Conn header validation, so HTTP response splitting is not possible, but attribute injection through ';' is not prevented.
This issue affects plug: from 0.1.0 before 1.16.6, from 1.17.0 before 1.17.4, from 1.18.0 before 1.18.5, from 1.19.0 before 1.19.5, from 1.20.0 before 1.20.3.
Workaround
Validate or reject the ';' delimiter in any untrusted data before passing it as a cookie value or attribute to Plug.Conn.put\_resp\_cookie/4 or Plug.Conn.Cookies.encode/2. Carriage return, line feed, and null bytes are already rejected by Plug.Conn header validation.
How this vulnerability can be exploited
This issue can be reached with local access to the system, attack complexity is low, an attacker needs no privileges on the target. No user interaction is required. Rated impact: confidentiality none, integrity low, availability none.
Affected software
CVE-2026-56813 is recorded against 2 packages.
- plug
- unknown
Timeline and source
Published on 10 July 2026 and last revised on 30 July 2026. No public exploit is currently recorded for this entry. A vendor advisory or fix has been published. Record sourced from NVD.
References
github.com (Advisory)
cna.erlef.org (Web)
github.com (Fix)
hex.pm (Package)
Details
CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:L/SA:N
Affected Packages
| Software | From version | Fixed in |
|---|---|---|
| plug | — | — |
| unknown | — | — |
References
Similar Threats
- Unknown CGA-6835-7pr2-x4gw
- Unknown CVE-2026-56814
- Unknown CVE-2026-54892
- Unknown CGA-594m-3qrh-m7qf
- Unknown CGA-434v-wc8g-cmvq
More CVE 2026 advisories
Browse all of CVE 2026 in the advisory index.
Free Vulnerability Check
Is your site affected by CVE-2026-56813?
BotEraser helps you identify potentially vulnerable plugins and themes by checking your installation against CVE-2026-56813 and other known CVE records.
Scan My Site Free →No credit card required · Results in minutes
ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.