Cookie attribute injection in Plug.Conn.Cookies.encode/2
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.1 before 1.19.5, and from 1.20.0 before 1.20.3.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2026-56813
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 7 Nov 2026, 10:16 UTC · Revision 1
Source evidence
Cookie attribute injection in Plug.Conn.Cookies.encode/2
core-osv · Original sourcePublished 10 Jul 2026, 12:51 UTC
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.1 before 1.19.5, and from 1.20.0 before 1.20.3.
osv:CVE-2026-56813
Complete source record
{
"id": "013bde93fa76ecf833097ede26c8038f58638ea17a796a241badad3b1cce9879",
"url": "https://osv.dev/vulnerability/CVE-2026-56813",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "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.1 before 1.19.5, and from 1.20.0 before 1.20.3.",
"evidence": "osv:CVE-2026-56813",
"products": [],
"severity": "low",
"structured": {
"id": "CVE-2026-56813",
"aliases": [
"CVE-2026-56813",
"EEF-CVE-2026-56813",
"GHSA-wpmj-jh88-rpgm"
],
"metrics": [
{
"type": "CVSS_V4",
"score": "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": [
{
"ranges": [
{
"repo": "https://github.com/elixir-plug/plug",
"type": "GIT",
"events": [
{
"introduced": "f26876aa67aaeb38e616638aa3efbcc2fe2906a5"
},
{
"fixed": "3f00dfad4e20ba88472e315c90a25742bf178f8e"
},
{
"fixed": "f26876aa67aaeb38e616638aa3efbcc2fe2906a5"
},
{
"fixed": "a6d1248659022749869963fd302687165ecf8c8b"
},
{
"fixed": "4167981747fe9ce75f374b94a28861ae950ea992"
},
{
"fixed": "149d9ed68fee0b4f77efd1e835ce5d785856697b"
},
{
"fixed": "eceb8315ce9a31ef784943a95a8624ebd1bc7e06"
}
],
"database_specific": {
"extracted_events": [
{
"range": [
{
"introduced": "f26876aa67aaeb38e616638aa3efbcc2fe2906a5"
},
{
"fixed": "3f00dfad4e20ba88472e315c90a25742bf178f8e"
}
],
"source": "AFFECTED_FIELD",
"strategy": "ChangesAt"
},
{
"range": [
{
"fixed": "f26876aa67aaeb38e616638aa3efbcc2fe2906a5"
}
],
"source": "REFERENCES_COMMIT"
},
{
"range": [
{
"fixed": "3f00dfad4e20ba88472e315c90a25742bf178f8e"
}
],
"source": "REFERENCES_COMMIT"
},
{
"range": [
{
"fixed": "a6d1248659022749869963fd302687165ecf8c8b"
}
],
"source": "REFERENCES_COMMIT"
},
{
"range": [
{
"fixed": "4167981747fe9ce75f374b94a28861ae950ea992"
}
],
"source": "REFERENCES_COMMIT"
},
{
"range": [
{
"fixed": "149d9ed68fee0b4f77efd1e835ce5d785856697b"
}
],
"source": "REFERENCES_COMMIT"
},
{
"range": [
{
"fixed": "eceb8315ce9a31ef784943a95a8624ebd1bc7e06"
}
],
"source": "REFERENCES_COMMIT"
}
]
}
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-56813.json"
}
}
],
"modified": "2026-10-28T02:30:50.326798871Z",
"provider": "osv",
"references": [
"https://cna.erlef.org/cves/CVE-2026-56813.html",
"https://github.com",
"https://osv.dev/vulnerability/EEF-CVE-2026-56813",
"https://repo.hex.pm",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/56xxx/CVE-2026-56813.json",
"https://github.com/elixir-plug/plug/security/advisories/GHSA-wpmj-jh88-rpgm",
"https://nvd.nist.gov/vuln/detail/CVE-2026-56813",
"https://github.com/elixir-plug/plug/commit/149d9ed68fee0b4f77efd1e835ce5d785856697b",
"https://github.com/elixir-plug/plug/commit/3f00dfad4e20ba88472e315c90a25742bf178f8e",
"https://github.com/elixir-plug/plug/commit/4167981747fe9ce75f374b94a28861ae950ea992",
"https://github.com/elixir-plug/plug/commit/a6d1248659022749869963fd302687165ecf8c8b",
"https://github.com/elixir-plug/plug/commit/eceb8315ce9a31ef784943a95a8624ebd1bc7e06",
"https://github.com/elixir-plug/plug/commit/f26876aa67aaeb38e616638aa3efbcc2fe2906a5",
"https://github.com/elixir-plug/plug"
],
"provider_metadata": {
"cwe_ids": [
"CWE-141"
],
"cna_assigner": "EEF",
"unresolved_ranges": [
{
"extracted_events": [
{
"range": [
{
"introduced": "0.1.0"
},
{
"fixed": "1.16.6"
},
{
"introduced": "1.17.0"
},
{
"fixed": "1.17.4"
},
{
"introduced": "1.18.0"
},
{
"fixed": "1.18.5"
},
{
"introduced": "1.19.1"
},
{
"fixed": "1.19.5"
},
{
"introduced": "1.20.0"
},
{
"fixed": "1.20.3"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StandardRange"
}
]
}
],
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/56xxx/CVE-2026-56813.json"
}
},
"related_cves": [
{
"value": "CVE-2026-56813",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 518981,
"published_at": "2026-07-10T12:51:08.758+00:00"
}