# CVE-2026-105963: Secret key base exposed in stack trace arguments on wrong-typed Plug.Crypto arguments

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.1
- **CVSS:** 5.1 (v4.0, CNA) `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`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Attack requirements: None; Privileges required: High; User interaction: None; Confidentiality impact: Low; Integrity impact: None; Availability impact: None; Confidentiality impact on other systems: None; Integrity impact on other systems: None; Availability impact on other systems: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, login needed
- **EPSS:** 0.71% (percentile 50, 2026-11-28)
- **CWE:** CWE-532
- **Published:** 2026-10-23T09:56:58.885Z
- **Modified:** 2026-11-20T06:17:17.743Z

## Who should check

- Anyone running elixir-plug plug \>= 1.6.3, \< 1.7.0
- Anyone running elixir-plug plug \>= 56000c33d8a0a2fbac491f8be06b9c5112bc2276, \< \*
- Anyone running elixir-plug plug\_crypto \>= 1.0.0, \< 2.2.1
- Anyone running elixir-plug plug\_crypto \>= 2d078b7b8264c565f0ff71235c515f4f46882dcf, \< 981887493dada0fce7003c61861c00dfbb0fc8c5

## Description

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.

## Affected and fixed versions

- elixir-plug plug: \>= 1.6.3, \< 1.7.0 (cvelist)
- elixir-plug plug: \>= 56000c33d8a0a2fbac491f8be06b9c5112bc2276, \< \* (cvelist)
- elixir-plug plug\_crypto: \>= 1.0.0, \< 2.2.1 (cvelist)
- elixir-plug plug\_crypto: \>= 2d078b7b8264c565f0ff71235c515f4f46882dcf, \< 981887493dada0fce7003c61861c00dfbb0fc8c5 (cvelist)

## Mitigation

- Upgrade plug to 1.7.0 or later.
- Upgrade plug\_crypto to 2.2.1 or later.
- Upgrade plug\_crypto to 981887493dada0fce7003c61861c00dfbb0fc8c5 or later.
- Vendor workaround: Check argument types in the calling code before entering Plug.Crypto, so no head guard ever fails. Pass a token to Phoenix.Token.verify/4, Phoenix.Token.decrypt/4, Plug.Crypto.verify/4 or Plug.Crypto.decrypt/4 only when is\_binary(token) holds, and treat anything else as an invalid token. Call Plug.Crypto.secure\_compare/2 only when both operands are binaries, treating a missing header or parameter as a failed comparison rather than passing nil.
- 
- Where the leaked value matters more than the crash, configuring the error tracker to drop stack-frame arguments also keeps the secret out of the forwarded report. For Sentry this means not sending vars with the crash report. This narrows exposure but leaves the value in the local error log.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-105963. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-105963.md
Affected: elixir-plug plug >= 1.6.3, < 1.7.0; elixir-plug plug >= 56000c33d8a0a2fbac491f8be06b9c5112bc2276, < *; elixir-plug plug_crypto >= 1.0.0, < 2.2.1; elixir-plug plug_crypto >= 2d078b7b8264c565f0ff71235c515f4f46882dcf, < 981887493dada0fce7003c61861c00dfbb0fc8c5
Fixed in: elixir-plug plug 1.7.0, elixir-plug plug_crypto 2.2.1, elixir-plug plug_crypto 981887493dada0fce7003c61861c00dfbb0fc8c5

Steps:
1. Search this machine and project for elixir-plug plug, elixir-plug plug_crypto: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-105963 being exploited?

There is no confirmed exploitation: CVE-2026-105963 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.71% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2026-105963?

Medium: CVSS 5.1 (v4.0, scored by CNA). Remote, login needed.

### Which versions are affected by CVE-2026-105963?

elixir-plug plug \>= 1.6.3, \< 1.7.0; elixir-plug plug \>= 56000c33d8a0a2fbac491f8be06b9c5112bc2276, \< \*; elixir-plug plug\_crypto \>= 1.0.0, \< 2.2.1; elixir-plug plug\_crypto \>= 2d078b7b8264c565f0ff71235c515f4f46882dcf, \< 981887493dada0fce7003c61861c00dfbb0fc8c5.

### Is there a fix for CVE-2026-105963?

Yes. Fixed in elixir-plug plug 1.7.0, elixir-plug plug\_crypto 2.2.1, elixir-plug plug\_crypto 981887493dada0fce7003c61861c00dfbb0fc8c5. Upgrade plug to 1.7.0 or later. Upgrade plug\_crypto to 2.2.1 or later. Upgrade plug\_crypto to 981887493dada0fce7003c61861c00dfbb0fc8c5 or later. Vendor workaround: Check argument types in the calling code before entering Plug.Crypto, so no head guard ever fails. Pass a token to Phoenix.Token.verify/4, Phoenix.Token.decrypt/4, Plug.Crypto.verify/4 or Plug.Crypto.decrypt/4 only when is\_binary(token) holds, and treat anything else as an invalid token. Call Plug.Crypto.secure\_compare/2 only when both operands are binaries, treating a missing header or parameter as a failed comparison rather than passing nil.  Where the leaked value matters more than the crash, configuring the error tracker to drop stack-frame arguments also keeps the secret out of the forwarded report. For Sentry this means not sending vars with the crash report. This narrows exposure but leaves the value in the local error log.

### How do I check if I'm affected by CVE-2026-105963?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/elixir-plug/plug/security/advisories/GHSA-ffw9-w85g-f2vh>
- patch: <https://github.com/elixir-plug/plug/commit/56000c33d8a0a2fbac491f8be06b9c5112bc2276>
- patch: <https://github.com/elixir-plug/plug/commit/aeaa90e76b73ea90c3ecca9aae16fce71bd2a8d4>
- patch: <https://github.com/elixir-plug/plug_crypto/commit/2d078b7b8264c565f0ff71235c515f4f46882dcf>
- patch: <https://github.com/elixir-plug/plug_crypto/commit/981887493dada0fce7003c61861c00dfbb0fc8c5>
- other: <https://cna.erlef.org/cves/CVE-2026-105963.html>
- other: <https://osv.dev/vulnerability/EEF-CVE-2026-105963>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-105963>

HTML: <https://flawdb.com/CVE-2026-105963> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-105963>
