Secret key base exposed in stack trace arguments on wrong-typed Plug.Crypto arguments
## Summary Externally-Generated Error Message Containing Sensitive Information vulnerability in `plug_crypto` in elixir-plug plug_crypto allows an unauthenticated remote attacker to expose the secret key base through application logs via a wrong-typed argument. Every public function in `Plug.Crypto` validates argument types in a function-head guard. A failed guard makes the Erlang VM raise `FunctionClauseError` with the actual argument values in the top stack frame, so the secret key base, a derived key, or the value an API key is compared against lands in that frame. The library's `rescue` blocks and `Plug.Crypto.prune_args_from_stacktrace/1` only reach exceptions raised inside a function body, so they never see a guard failure. Plug.Cowboy and Bandit write the frame to the error log and attach it as `crash_reason` Logger metadata, which error trackers forward. Two entry points take request data. `Plug.Crypto.verify/4` exposes the secret key base when the token is neither a binary nor nil, which `Phoenix.Token.verify/4` reaches because it forwards the token unguarded. `Plug.Crypto.secure_compare/2` exposes the other operand when one side is not a binary, as happens when a missing request header yields nil. Reading the leaked value needs separate access to the logs or the error tracker, so the request alone does not disclose the secret to the attacker. This issue affects plug: from 1.6.3 before 1.7.0; plug_crypto: from 1.0.0 before 2.2.1. ## Details **1. Type checks in functi
- Products
- plug, plug_crypto
- Affected versions
- 1.0.0, 1.1.0, 1.1.1, 1.1.2, 1.2.0, 1.2.1, 1.2.2, 1.2.3, 1.2.4, 1.2.5, 1.6.3, 1.6.4, 2.0.0, 2.1.0, 2.1.1, 2.2.0
- Fixed versions
- 1.7.0, 2.2.1
- CVEs
- CVE-2026-105963
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 20:58 UTC · Revision 1
Source evidence
Secret key base exposed in stack trace arguments on wrong-typed Plug.Crypto arguments
core-osv · Original sourcePublished 23 Oct 2026, 09:56 UTC
## Summary Externally-Generated Error Message Containing Sensitive Information vulnerability in `plug_crypto` in elixir-plug plug_crypto allows an unauthenticated remote attacker to expose the secret key base through application logs via a wrong-typed argument. Every public function in `Plug.Crypto` validates argument types in a function-head guard. A failed guard makes the Erlang VM raise `FunctionClauseError` with the actual argument values in the top stack frame, so the secret key base, a derived key, or the value an API key is compared against lands in that frame. The library's `rescue` blocks and `Plug.Crypto.prune_args_from_stacktrace/1` only reach exceptions raised inside a function body, so they never see a guard failure. Plug.Cowboy and Bandit write the frame to the error log and attach it as `crash_reason` Logger metadata, which error trackers forward. Two entry points take request data. `Plug.Crypto.verify/4` exposes the secret key base when the token is neither a binary nor nil, which `Phoenix.Token.verify/4` reaches because it forwards the token unguarded. `Plug.Crypto.secure_compare/2` exposes the other operand when one side is not a binary, as happens when a missing request header yields nil. Reading the leaked value needs separate access to the logs or the error tracker, so the request alone does not disclose the secret to the attacker. This issue affects plug: from 1.6.3 before 1.7.0; plug_crypto: from 1.0.0 before 2.2.1. ## Details **1. Type checks in functi
osv:EEF-CVE-2026-105963
plug
Fixed versions: 1.7.0
plug_crypto
Fixed versions: 2.2.1
Complete source record
{
"id": "e3e65bfd7ade12426bfa7a2e3907cc730d0d43712da1eb1b22303e078f5190be",
"url": "https://osv.dev/vulnerability/EEF-CVE-2026-105963",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "Secret key base exposed in stack trace arguments on wrong-typed Plug.Crypto arguments",
"summary": "## Summary Externally-Generated Error Message Containing Sensitive Information vulnerability in `plug_crypto` in elixir-plug plug_crypto allows an unauthenticated remote attacker to expose the secret key base through application logs via a wrong-typed argument. Every public function in `Plug.Crypto` validates argument types in a function-head guard. A failed guard makes the Erlang VM raise `FunctionClauseError` with the actual argument values in the top stack frame, so the secret key base, a derived key, or the value an API key is compared against lands in that frame. The library's `rescue` blocks and `Plug.Crypto.prune_args_from_stacktrace/1` only reach exceptions raised inside a function body, so they never see a guard failure. Plug.Cowboy and Bandit write the frame to the error log and attach it as `crash_reason` Logger metadata, which error trackers forward. Two entry points take request data. `Plug.Crypto.verify/4` exposes the secret key base when the token is neither a binary nor nil, which `Phoenix.Token.verify/4` reaches because it forwards the token unguarded. `Plug.Crypto.secure_compare/2` exposes the other operand when one side is not a binary, as happens when a missing request header yields nil. Reading the leaked value needs separate access to the logs or the error tracker, so the request alone does not disclose the secret to the attacker. This issue affects plug: from 1.6.3 before 1.7.0; plug_crypto: from 1.0.0 before 2.2.1. ## Details **1. Type checks in functi",
"evidence": "osv:EEF-CVE-2026-105963",
"products": [
{
"name": {
"value": "plug",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "1.7.0",
"evidence": "/affected/0/ranges"
}
],
"affected_versions": [
{
"value": "1.6.3",
"evidence": "/affected/0/versions"
},
{
"value": "1.6.4",
"evidence": "/affected/0/versions"
}
]
},
{
"name": {
"value": "plug_crypto",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "2.2.1",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": [
{
"value": "1.0.0",
"evidence": "/affected/1/versions"
},
{
"value": "1.1.0",
"evidence": "/affected/1/versions"
},
{
"value": "1.1.1",
"evidence": "/affected/1/versions"
},
{
"value": "1.1.2",
"evidence": "/affected/1/versions"
},
{
"value": "1.2.0",
"evidence": "/affected/1/versions"
},
{
"value": "1.2.1",
"evidence": "/affected/1/versions"
},
{
"value": "1.2.2",
"evidence": "/affected/1/versions"
},
{
"value": "1.2.3",
"evidence": "/affected/1/versions"
},
{
"value": "1.2.4",
"evidence": "/affected/1/versions"
},
{
"value": "1.2.5",
"evidence": "/affected/1/versions"
},
{
"value": "2.0.0",
"evidence": "/affected/1/versions"
},
{
"value": "2.1.0",
"evidence": "/affected/1/versions"
},
{
"value": "2.1.1",
"evidence": "/affected/1/versions"
},
{
"value": "2.2.0",
"evidence": "/affected/1/versions"
}
]
}
],
"severity": "medium",
"structured": {
"id": "EEF-CVE-2026-105963",
"aliases": [
"CVE-2026-105963",
"EEF-CVE-2026-105963",
"GHSA-ffw9-w85g-f2vh"
],
"metrics": [
{
"type": "CVSS_V4",
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N"
}
],
"affected": [
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "1.6.3"
},
{
"fixed": "1.7.0"
}
]
}
],
"package": {
"name": "plug",
"purl": "pkg:hex/plug",
"ecosystem": "Hex"
},
"versions": [
"1.6.3",
"1.6.4"
],
"database_specific": {
"source": "https://cna.erlef.org/osv/EEF-CVE-2026-105963.json"
}
},
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "1.0.0"
},
{
"fixed": "2.2.1"
}
]
}
],
"package": {
"name": "plug_crypto",
"purl": "pkg:hex/plug_crypto",
"ecosystem": "Hex"
},
"versions": [
"1.0.0",
"1.1.0",
"1.1.1",
"1.1.2",
"1.2.0",
"1.2.1",
"1.2.2",
"1.2.3",
"1.2.4",
"1.2.5",
"2.0.0",
"2.1.0",
"2.1.1",
"2.2.0"
],
"database_specific": {
"source": "https://cna.erlef.org/osv/EEF-CVE-2026-105963.json"
}
},
{
"ranges": [
{
"repo": "https://github.com/elixir-plug/plug",
"type": "GIT",
"events": [
{
"introduced": "56000c33d8a0a2fbac491f8be06b9c5112bc2276"
}
]
}
],
"versions": [
"v1.6.4",
"v1.6.3"
],
"database_specific": {
"source": "https://cna.erlef.org/osv/EEF-CVE-2026-105963.json"
}
},
{
"ranges": [
{
"repo": "https://github.com/elixir-plug/plug_crypto",
"type": "GIT",
"events": [
{
"introduced": "2d078b7b8264c565f0ff71235c515f4f46882dcf"
},
{
"fixed": "981887493dada0fce7003c61861c00dfbb0fc8c5"
}
]
}
],
"versions": [
"v2.2.0",
"v2.1.1",
"v2.1.0",
"v2.0.0",
"v1.2.5",
"v1.2.4",
"v1.2.2",
"v1.2.1",
"v1.2.0",
"v1.1.2",
"v1.1.1",
"v1.1.0",
"v1.0.0"
],
"database_specific": {
"source": "https://cna.erlef.org/osv/EEF-CVE-2026-105963.json"
}
}
],
"modified": "2026-10-23T10:10:50.206216545Z",
"provider": "osv",
"references": [
"https://github.com/elixir-plug/plug/security/advisories/GHSA-ffw9-w85g-f2vh",
"https://cna.erlef.org/cves/CVE-2026-105963.html",
"https://github.com/elixir-plug/plug/commit/56000c33d8a0a2fbac491f8be06b9c5112bc2276",
"https://github.com/elixir-plug/plug/commit/aeaa90e76b73ea90c3ecca9aae16fce71bd2a8d4",
"https://github.com/elixir-plug/plug_crypto/commit/2d078b7b8264c565f0ff71235c515f4f46882dcf",
"https://github.com/elixir-plug/plug_crypto/commit/981887493dada0fce7003c61861c00dfbb0fc8c5",
"https://hex.pm/packages/plug",
"https://hex.pm/packages/plug_crypto"
],
"provider_metadata": {
"cpe_ids": [
"cpe:2.3:a:elixir-plug:plug:*:*:*:*:*:*:*:*",
"cpe:2.3:a:elixir-plug:plug_crypto:*:*:*:*:*:*:*:*"
],
"cwe_ids": [
"CWE-532"
],
"capec_ids": [
"CAPEC-54"
]
}
},
"related_cves": [
{
"value": "CVE-2026-105963",
"evidence": "/aliases"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 412608,
"published_at": "2026-10-23T09:56:58.885+00:00"
}