Skip to main content

db_connection CVE-2026-133555

| EUVDEUVD-2026-133978 HIGH
Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection') (CWE-470)
2026-11-24 EEF
8.9
CVSS 4.0 · Vendor: EEF
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Reach app decoding untrusted Erlang terms
  2. Delivery
    Deliver forged DBConnection.Stream struct
  3. Exploit
    App enumerates struct via Enumerable
  4. Execution
    :log {module,function,args} tuple applied
  5. Impact
    Arbitrary function executed in BEAM VM

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V15 - Secure Coding and Architecture Reflection safety, class allowlisting
Exploitation Conditions

Not exploitable in db_connection alone. The concrete prerequisite is that the application, or one of its dependencies, builds Elixir structs from untrusted input - specifically by decoding attacker-controlled data with :erlang.binary_to_term/2 or Plug.Crypto.non_executable_binary_to_term/2 - and then enumerates or inspects the resulting value. Critically, the :safe / non-executable option does NOT reject structs, so it provides no protection here, and the forged DBConnection.Stream / DBConnection.PrepareStream struct must carry a :log {module, function, arguments} tuple that DBConnection applies on enumeration. Limiting factors that reduce real-world exposure: an application that never deserializes untrusted terms is unaffected; both deserialization AND subsequent enumeration/inspection of the forged struct must occur; and the called function is limited to exported functions of already-loaded modules in the VM (though that is sufficient for code execution).

Impact

The CVSS 4.0 base score is 8.9 (High) with vector AV:L/AC:L/AT:P/PR:N/UI:N and full High impact on both the vulnerable system (VC/VI/VA:H) and subsequent systems (SC/SI/SA:H), reflecting arbitrary code execution. The AT:P (attack requirement) metric is the key signal: this is NOT a flaw in db_connection alone - the advisory is explicit that exploitation requires a downstream component that decodes untrusted input via :erlang.binary_to_term/2 (or Plug.Crypto.non_executable_binary_to_term/2) and then enumerates the forged struct. No EPSS score is provided in the input, and the CVE is NOT listed in CISA KEV, so I cannot assert confirmed active exploitation. However, the advisory itself states 'This record exists because the struct was used in attacks on such components' - a vendor claim of real-world attacks against downstream consumers that is not corroborated by a KEV entry, suggesting targeted exploitation of specific Elixir deployments rather than broad opportunistic scanning. The vuln.today decision label is 'this_week' (not act_now/emergency). Signal conflict to verify: CVSS declares AV:L (local), yet the realistic delivery path is network-borne untrusted Erlang terms - the sibling record CVE-2026-129514 is titled 'Unauthenticated remote code execution through struct values in Erlang term request bodies' - so operational reachability may be networked even though db_connection's own enumeration is local; verify with the EEF CNA. Net: a real, prioritizable issue for Elixir/Ecto applications that deserialize untrusted terms, but near-zero risk for deployments that never decode untrusted binary_to_term input.

Exploit ScenarioDerived

An application (or one of its dependencies) decodes attacker-supplied serialized Erlang terms - for example a request body, cookie, or pagination cursor - using :erlang.binary_to_term/2 (the :safe/non-executable option does not reject structs) and then enumerates the result. The attacker supplies a forged DBConnection.Stream or DBConnection.PrepareStream struct whose :log key holds a {module, function, arguments} tuple; when the application enumerates it, DBConnection invokes that function, executing attacker-chosen code in the application's BEAM VM. No verified working exploit code is present in the input (references are the advisory and patch commits only), though the advisory states such structs were used in attacks on downstream components.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.5% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Nov 24, 2026

Arbitrary code execution in applications running the Elixir db_connection library 1.1.0 through 2.10.2 is possible when a downstream component deserializes untrusted Erlang terms and then enumerates a forged DBConnection.Stream or DBConnection.PrepareStream struct. The struct's :log option holds a {module, function, arguments} tuple that DBConnection applies during enumeration, letting an attacker invoke an exported function of an already-loaded module with chosen arguments. db_connection is not exploitable on its own: the prerequisite is a component that decodes attacker-controlled data with :erlang.binary_to_term/2 or Plug.Crypto.non_executable_binary_to_term/2 without restricting the resulting terms - the :safe option does not reject structs - and the advisory notes such forged structs were used in attacks on downstream components; 2.10.3 is the fixed release.

RemediationAI

Upgrade db_connection to 2.10.3 or later - this is the vendor-released fixed version, delivered by commit 9a4230a60a33ca9eed76c18c494c3a59acddb04b and documented in advisory GHSA-gmmq-fw75-wq46 (https://github.com/elixir-ecto/db_connection/security/advisories/GHSA-gmmq-fw75-wq46), with the EEF CNA record at https://cna.erlef.org/cves/CVE-2026-133555.html and OSV entry https://osv.dev/vulnerability/EEF-CVE-2026-133555. Because the root cause lives in the consumer of the decoded term rather than in db_connection, also audit every application and dependency that decodes untrusted input with :erlang.binary_to_term/2 or Plug.Crypto.non_executable_binary_to_term/2 and reject unexpected structs - including DBConnection.Stream and DBConnection.PrepareStream, and structs from other libraries that can produce a similar effect - from the decoded value before it is enumerated or inspected; the :safe / non-executable option does not provide this protection. Applications that never deserialize untrusted terms are unaffected by this record.

Affected VersionsENISA

db_connection 7b21e044e4a2f9fa0cc4b001bc6cda0ecc2ae4d2 <9a4230a60a33ca9eed76c18c494c3a59acddb04b
db_connection 1.1.0 <2.10.3

Affected Packages

euvd db_connection fix: 2.10.3

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The flaw is CWE-470 (Use of Externally-Controlled Input to Select Classes or Code, 'Unsafe Reflection') in the Elixir db_connection library. Elixir structs are tagged maps, and both DBConnection.Stream and DBConnection.PrepareStream implement the Enumerable protocol in lib/db_connection.ex; those implementations run with the options carried inside the struct itself. Because the :log option accepts an arbitrary {module, function, arguments} tuple that DBConnection applies, enumerating a forged struct results in a call to an exported function of a loaded module with attacker-chosen arguments. The decisive mitigating design detail is that the library is a gadget, not a standalone entry point: the attacker must first get the application, or one of its dependencies, to build the struct from untrusted input - typically by decoding attacker-supplied data with :erlang.binary_to_term/2 or Plug.Crypto.non_executable_binary_to_term/2 and then enumerating or inspecting the result. The :safe / non-executable option blocks new atoms but does not reject existing structs, and the forged structs contain only plain terms, so it offers no protection. Exposure is therefore limited to applications that deserialize untrusted terms and subsequently enumerate them, and the reachable primitive is limited to exported functions of already-loaded modules - which is nevertheless sufficient for code execution. The vendor fix commit is 9a4230a60a33ca9eed76c18c494c3a59acddb04b, with the vulnerable behaviour introduced in 7b21e044e4a2f9fa0cc4b001bc6cda0ecc2ae4d2.

Know when Elixir gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (EEF) PRIMARY 8.9 HIGH
CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H
vuln.today AI 8.1 HIGH

Exploitation needs a non-default app path that decodes untrusted terms and enumerates the struct (AC:H), no privileges or interaction thereafter (PR:N/UI:N), and code execution crossing into the host application (S:C, C/I/A:H).

3.1 AV:L/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H
4.0 AV:L/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H

Primary rating from Vendor (EEF).

CVSS VectorVendor: EEF

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
High
Subsequent system: Integrity
High
Subsequent system: Availability
High

DescriptionCVE.org

Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection') vulnerability in elixir-ecto db_connection allows an attacker to execute arbitrary code via a forged DBConnection.Stream or DBConnection.PrepareStream struct. The Enumerable implementations of both structs in lib/db_connection.ex run with the options stored in the struct. The :log option accepts a {module, function, arguments} tuple, which DBConnection applies. When code enumerates a forged struct, DBConnection calls the chosen function.

This issue is not exploitable in db_connection alone. It is, in theory, a vulnerability of the downstream component. The root cause is a component that decodes untrusted input with :erlang.binary_to_term/2 and does not restrict which terms the result contains. The :safe option does not reject structs, and these structs contain only plain terms. Structs of other libraries can possibly lead to the same result, so a component that decodes untrusted terms stays at risk independently of db_connection. This record exists because the struct was used in attacks on such components.

This issue affects db_connection: from 1.1.0 before 2.10.3.

Technical POC Analysis

CWE-470 (Use of Externally-Controlled Input to Select Classes or Code, "unsafe reflection").

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

Elixir applications using the db_connection library (versions 1.1.0-2.10.2) face a high-severity code execution risk when paired with components that deserialize untrusted Erlang terms. This vulnerability could allow attackers to execute arbitrary code on affected systems, potentially leading to data breaches or service disruption. Leadership should prioritize remediation because exploitation requires a specific yet plausible downstream misconfiguration, and a patch is available.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.5%
Top 67% exploitable
Prevalence
Medium
core Elixir/Ecto database library, ubiquitous within a relatively niche ecosystem
Social Media
1
Sightings
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.5%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation· derived
None
System Exposure· derived
Small
Automatable· derived
No
Human Impact
High

Priority Score

44
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +44
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

More in Elixir

View all
CVE-2026-54451 HIGH POC
8.2 Jul 15

Unbounded recursion in the Elixir `protobuf` Hex package (versions >= 0.8.0, < 0.16.1) lets unauthenticated remote attac

CVE-2026-91187 CRITICAL
9.3 Sep 24

Improper JWT signature verification in Dashbit's nimble_zta (0.1.2 up to but not including 0.1.3) lets an unauthenticate

CVE-2026-130411 CRITICAL
9.2 Nov 24

Remote code execution in the Elixir Flop pagination library affects versions 0.8.0 through 0.26.6, 0.27.0 through 0.27.2

CVE-2026-76949 CRITICAL
9.1 Sep 17

Session-swapping authentication bypass in the Elixir library AshAuthentication (versions 4.10.0 before 4.15.0 and 5.0.0-

CVE-2026-88952 CRITICAL
9.1 Sep 17

Account takeover in AshAuthentication (Elixir/Ash) 4.14.0 through 4.14.x and 5.0.0-rc.10 through 5.0.0-rc.13 lets unauth

CVE-2026-91039 CRITICAL
9.1 Sep 17

Authentication bypass in the Elixir library ash_authentication lets an attacker who operates one federated identity-prov

CVE-2026-77866 CRITICAL
9.0 Sep 15

Server-Side Request Forgery protection bypass in the Elixir safeurl library (versions 0.1.0 and later) allows unauthenti

CVE-2026-108529 HIGH
8.7 Oct 26

Unauthenticated remote CPU exhaustion in mtrudel Bandit's HTTP/2 server (versions before 1.14.0) is achievable by holdin

CVE-2026-110499 HIGH
8.7 Oct 26

Unbounded per-connection memory and CPU growth in the Elixir Bandit HTTP/2 server (0.3.6 up to 1.14.0) lets an unauthent

CVE-2026-111101 HIGH
8.7 Oct 26

Unauthenticated remote denial of service in the Elixir HTTP server Bandit (mtrudel/bandit) from 0.1.0 before 1.14.0 lets

CVE-2026-113436 HIGH
8.7 Oct 26

Unauthenticated remote attackers can consume disproportionate server CPU on Bandit (mtrudel/bandit, Elixir/Erlang) by se

CVE-2026-121809 HIGH
8.2 Nov 13

Denial of service through CPU exhaustion in the Elixir gRPC stack: grpc_server 1.0.0 through 1.1.0 (exclusive) and the p

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy