{"id":"CVE-2026-133555","aliases":["CVE-2026-133555","EEF-CVE-2026-133555","GHSA-gmmq-fw75-wq46"],"related":[],"kind":"vulnerability","state":"published","title":"Code execution via the :log option of forged DBConnection.Stream structs in db_connection","summary":"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.\n\nThis 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.\n\nThis issue affects db_connection: from 1.1.0 before 2.10.3.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.\n\nThis 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.\n\nThis issue affects db_connection: from 1.1.0 before 2.10.3.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nUse 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.\n\nThis 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.\n\nThis issue affects db_connection: from 1.1.0 before 2.10.3.\n\n## Impact\n\nAn attacker who can make an application build and enumerate a forged stream struct can call an exported function of a loaded module with chosen arguments in the application's VM.\n\n## Configurations\n\nThe application, or one of its dependencies, builds Elixir structs from untrusted input (for example with `:erlang.binary_to_term/2` or `Plug.Crypto.non_executable_binary_to_term/2`) and then enumerates or inspects the result.","format":"markdown","source":"eef"}],"published":"2026-11-24T14:12:48.271Z","modified":"2026-11-25T17:23:04.305Z","severity":{"scorer":"EEF","scheme":"CVSS:4.0","vector":"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","score":8.9,"rating":"HIGH"},"severities":[{"scorer":"EEF","scheme":"CVSS:4.0","vector":"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","score":8.9,"rating":"HIGH"},{"scorer":"Erlang Ecosystem Foundation","scheme":"CVSS:4.0","vector":"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"}],"cwes":["CWE-470"],"affected":[{"ranges":[{"type":"semver","introduced":"1.1.0","fixed":"2.10.3","status":"affected"}],"vendor":"elixir-ecto","product":"db_connection","package":"db_connection","cpe":"cpe:2.3:a:elixir-ecto:db_connection:*:*:*:*:*:*:*:*","repo":"https://github.com/elixir-ecto/db_connection","source":"cvelist"},{"ranges":[{"type":"git","introduced":"7b21e044e4a2f9fa0cc4b001bc6cda0ecc2ae4d2","fixed":"9a4230a60a33ca9eed76c18c494c3a59acddb04b","status":"affected"}],"vendor":"elixir-ecto","product":"db_connection","package":"elixir-ecto/db_connection","cpe":"cpe:2.3:a:elixir-ecto:db_connection:*:*:*:*:*:*:*:*","repo":"https://github.com/elixir-ecto/db_connection","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"1.1.0","status":"affected","fixed":"2.10.3"}],"ecosystem":"Hex","package":"db_connection","purl":"pkg:hex/db_connection","source":"eef"},{"ranges":[{"type":"git","introduced":"7b21e044e4a2f9fa0cc4b001bc6cda0ecc2ae4d2","status":"affected","fixed":"9a4230a60a33ca9eed76c18c494c3a59acddb04b"}],"repo":"https://github.com/elixir-ecto/db_connection","source":"eef"}],"references":[{"url":"https://github.com/elixir-ecto/db_connection/security/advisories/GHSA-gmmq-fw75-wq46","tags":["advisory","related","vendor-advisory"],"sources":["cvelist","eef","nvd"]},{"url":"https://cna.erlef.org/cves/CVE-2026-133555.html","tags":["related","web"],"sources":["cvelist","eef","nvd"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-133555","tags":["related"],"sources":["cvelist","nvd"]},{"url":"https://cna.erlef.org/cves/CVE-2026-124283.html","tags":["related","web"],"sources":["cvelist","eef","nvd"]},{"url":"https://cna.erlef.org/cves/CVE-2026-129514.html","tags":["related","web"],"sources":["cvelist","eef","nvd"]},{"url":"https://cna.erlef.org/cves/CVE-2026-130411.html","tags":["related","web"],"sources":["cvelist","eef","nvd"]},{"url":"https://github.com/elixir-ecto/db_connection/commit/7b21e044e4a2f9fa0cc4b001bc6cda0ecc2ae4d2","tags":["related","web"],"sources":["cvelist","eef","nvd"]},{"url":"https://github.com/elixir-ecto/db_connection/commit/9a4230a60a33ca9eed76c18c494c3a59acddb04b","tags":["fix","patch"],"sources":["cvelist","eef","nvd"]},{"url":"https://hex.pm/packages/db_connection","tags":["package"],"sources":["eef"]}],"credits":["Jonatan Männchen / EEF","José Valim"],"assigner":"EEF","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-133555","url":"https://www.cve.org/CVERecord?id=CVE-2026-133555","licence":"CVE Terms of Use","modified":"2026-11-24T14:59:40.084Z"},{"source":"eef","name":"Erlang Ecosystem Foundation","id":"EEF-CVE-2026-133555","url":"https://osv.dev/vulnerability/EEF-CVE-2026-133555","licence":"CC-BY-4.0","modified":"2026-11-25T17:23:04.305Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-133555","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-133555","licence":"Public domain","modified":"2026-11-24T19:12:16.707Z"}],"updatedAt":"2026-11-25T22:59:52.823Z","epss":{"score":0.00474,"percentile":0.42624,"date":"2026-12-01T12:00:22.000Z"}}