{"containers":{"cna":{"affected":[{"cpes":["cpe:2.3:a:erlang:rebar3:*:*:*:*:*:*:*:*"],"defaultStatus":"unaffected","modules":["r3_hex_repo","r3_hex_api"],"packageName":"rebar3","packageURL":"pkg:otp/rebar3?repository_url=https:%2F%2Fgithub.com%2Ferlang%2Frebar3&vcs_url=repository_url=git%2Bhttps:%2F%2Fgithub.com%2Ferlang%2Frebar3.git","product":"rebar3","programFiles":["apps/rebar/src/vendored/r3_hex_repo.erl","apps/rebar/src/vendored/r3_hex_api.erl"],"programRoutines":[{"name":"r3_hex_repo:get_names/1"},{"name":"r3_hex_repo:get_versions/1"},{"name":"r3_hex_repo:get_package/2"},{"name":"r3_hex_api:request/4"}],"repo":"https://github.com/erlang/rebar3","vendor":"erlang","versions":[{"lessThan":"3.27.3","status":"affected","version":"3.9.1","versionType":"semver"}]},{"collectionURL":"https://github.com","cpes":["cpe:2.3:a:erlang:rebar3:*:*:*:*:*:*:*:*"],"defaultStatus":"unaffected","modules":["r3_hex_repo","r3_hex_api"],"packageName":"erlang/rebar3","packageURL":"pkg:github/erlang/rebar3","product":"rebar3","programFiles":["apps/rebar/src/vendored/r3_hex_repo.erl","apps/rebar/src/vendored/r3_hex_api.erl"],"programRoutines":[{"name":"r3_hex_repo:get_names/1"},{"name":"r3_hex_repo:get_versions/1"},{"name":"r3_hex_repo:get_package/2"},{"name":"r3_hex_api:request/4"}],"repo":"https://github.com/erlang/rebar3","vendor":"erlang","versions":[{"lessThan":"360838a22f5b3a88c0358207f2923059bcbb3afb","status":"affected","version":"209c02ec57c2cc3207ee0174c3af3675b8dc8f79","versionType":"git"}]},{"collectionURL":"https://repo.hex.pm","cpes":["cpe:2.3:a:hexpm:hex_core:*:*:*:*:*:*:*:*"],"defaultStatus":"unaffected","modules":["hex_repo","hex_api","hex_safe_binary_to_term"],"packageName":"hex_core","packageURL":"pkg:hex/hex_core","product":"hex_core","programFiles":["src/hex_repo.erl","src/hex_api.erl","src/hex_safe_binary_to_term.erl"],"programRoutines":[{"name":"hex_repo:get_names/1"},{"name":"hex_repo:get_versions/1"},{"name":"hex_repo:get_package/2"},{"name":"hex_repo:get_policy/2"},{"name":"hex_api:request/4"},{"name":"hex_safe_binary_to_term:safe_binary_to_term/1"}],"repo":"https://github.com/hexpm/hex_core","vendor":"hexpm","versions":[{"lessThan":"0.20.0","status":"affected","version":"0.1.0","versionType":"semver"}]},{"collectionURL":"https://github.com","cpes":["cpe:2.3:a:hexpm:hex_core:*:*:*:*:*:*:*:*"],"defaultStatus":"unaffected","modules":["hex_repo","hex_api","hex_safe_binary_to_term"],"packageName":"hexpm/hex_core","packageURL":"pkg:github/hexpm/hex_core","product":"hex_core","programFiles":["src/hex_repo.erl","src/hex_api.erl","src/hex_safe_binary_to_term.erl"],"programRoutines":[{"name":"hex_repo:get_names/1"},{"name":"hex_repo:get_versions/1"},{"name":"hex_repo:get_package/2"},{"name":"hex_repo:get_policy/2"},{"name":"hex_api:request/4"},{"name":"hex_safe_binary_to_term:safe_binary_to_term/1"}],"repo":"https://github.com/hexpm/hex_core","vendor":"hexpm","versions":[{"lessThan":"ebe25d110717f6a3addba5232cd4a7dc1c76b628","status":"affected","version":"fbb6d9de472e5edb8d6fb6b32a91cb266137892e","versionType":"git"}]},{"cpes":["cpe:2.3:a:hexpm:hex:*:*:*:*:*:*:*:*"],"defaultStatus":"unaffected","modules":["mix_hex_repo","mix_hex_api"],"packageName":"hex","packageURL":"pkg:otp/hex?repository_url=https:%2F%2Fgithub.com%2Fhexpm%2Fhex&vcs_url=repository_url=git%2Bhttps:%2F%2Fgithub.com%2Fhexpm%2Fhex.git","product":"hex","programFiles":["src/mix_hex_repo.erl","src/mix_hex_api.erl"],"programRoutines":[{"name":"mix_hex_repo:get_names/1"},{"name":"mix_hex_repo:get_versions/1"},{"name":"mix_hex_repo:get_package/2"},{"name":"mix_hex_repo:get_policy/2"},{"name":"mix_hex_api:request/4"}],"repo":"https://github.com/hexpm/hex","vendor":"hexpm","versions":[{"lessThan":"2.5.2","status":"affected","version":"2.1.0","versionType":"semver"}]},{"collectionURL":"https://github.com","cpes":["cpe:2.3:a:hexpm:hex:*:*:*:*:*:*:*:*"],"defaultStatus":"unaffected","modules":["mix_hex_repo","mix_hex_api"],"packageName":"hexpm/hex","packageURL":"pkg:github/hexpm/hex","product":"hex","programFiles":["src/mix_hex_repo.erl","src/mix_hex_api.erl"],"programRoutines":[{"name":"mix_hex_repo:get_names/1"},{"name":"mix_hex_repo:get_versions/1"},{"name":"mix_hex_repo:get_package/2"},{"name":"mix_hex_repo:get_policy/2"},{"name":"mix_hex_api:request/4"}],"repo":"https://github.com/hexpm/hex","vendor":"hexpm","versions":[{"lessThan":"d8b60eee97abb119d525306f048969a217d793a5","status":"affected","version":"671f695ac548ed01f5828c2a739ecaa942b21007","versionType":"git"}]}],"configurations":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p>Registry decoding is affected when a repository's URL points at a mirror or another server the user doesn't trust with the availability of their builds, for example Hex's <code>HEX_MIRROR_URL</code> or <code>mirror_url</code> and rebar3's <code>HEX_MIRROR_URL</code>. API decoding is affected when the API URL points at such a server or an attacker can alter API responses. Requests to repo.hex.pm and hex.pm over verified HTTPS aren't affected.</p>"},{"base64":false,"type":"text/markdown","value":"Registry decoding is affected when a repository's URL points at a mirror or another server the user doesn't trust with the availability of their builds, for example Hex's `HEX_MIRROR_URL` or `mirror_url` and rebar3's `HEX_MIRROR_URL`. API decoding is affected when the API URL points at such a server or an attacker can alter API responses. Requests to repo.hex.pm and hex.pm over verified HTTPS aren't affected."}],"value":"Registry decoding is affected when a repository's URL points at a mirror or another server the user doesn't trust with the availability of their builds, for example Hex's HEX_MIRROR_URL or mirror_url and rebar3's HEX_MIRROR_URL. API decoding is affected when the API URL points at such a server or an attacker can alter API responses. Requests to repo.hex.pm and hex.pm over verified HTTPS aren't affected."}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:a:erlang:rebar3:*:*:*:*:*:*:*:*","versionEndExcluding":"3.27.3","versionStartIncluding":"3.9.1","vulnerable":true},{"criteria":"cpe:2.3:a:hexpm:hex_core:*:*:*:*:*:*:*:*","versionEndExcluding":"0.20.0","versionStartIncluding":"0.1.0","vulnerable":true},{"criteria":"cpe:2.3:a:hexpm:hex:*:*:*:*:*:*:*:*","versionEndExcluding":"2.5.2","versionStartIncluding":"2.1.0","vulnerable":true}],"negate":false,"operator":"OR"}],"operator":"AND"}],"credits":[{"lang":"en","type":"finder","value":"Peter Ullrich"},{"lang":"en","type":"remediation developer","value":"Eric Meadows-Jönsson"},{"lang":"en","type":"analyst","value":"Jonatan Männchen / EEF"}],"dateAssigned":"2026-10-10T13:01:00.000Z","datePublic":"2026-10-12T16:43:59.000Z","descriptions":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p>Improper Handling of Highly Compressed Data (Data Amplification) vulnerability in hexpm hex_core allows an untrusted repository mirror, or a server answering hex_core's API requests, to exhaust the memory of the Erlang VM running hex_core. The same code is vendored in Hex (<code>mix_hex_repo</code>, <code>mix_hex_api</code>) and rebar3 (<code>r3_hex_repo</code>, <code>r3_hex_api</code>).</p>\n<p><code>hex_repo:get_names/1</code>, <code>hex_repo:get_versions/1</code>, <code>hex_repo:get_package/2</code> and <code>hex_repo:get_policy/2</code> decompress the registry response with <code>zlib:gunzip/1</code> and decode the signed envelope before verifying its signature. A mirror doesn't have the repository's private key, but it chooses the compressed bytes, so a small response decompresses into an envelope of any size before the signature check rejects it.</p>\n<p><code>hex_api</code> decodes responses with the <code>application/vnd.hex+erlang</code> content type through <code>hex_safe_binary_to_term:safe_binary_to_term/1</code>, which calls <code>binary_to_term(Binary, [safe])</code>. The <code>safe</code> option prevents atom creation, but it accepts compressed terms and doesn't limit the size of the decoded term, and the check that rejects functions and ports runs after the term has been built. The fix for CVE-2026-21619 added the <code>safe</code> option and that check without bounding the decoded size.</p>\n<p>This issue affects rebar3: from 3.9.1 before 3.27.3; hex: from 2.1.0 before 2.5.2; hex_core: from 0.1.0 before 0.20.0.</p>"},{"base64":false,"type":"text/markdown","value":"Improper Handling of Highly Compressed Data (Data Amplification) vulnerability in hexpm hex_core allows an untrusted repository mirror, or a server answering hex_core's API requests, to exhaust the memory of the Erlang VM running hex_core. The same code is vendored in Hex (`mix_hex_repo`, `mix_hex_api`) and rebar3 (`r3_hex_repo`, `r3_hex_api`).\n\n`hex_repo:get_names/1`, `hex_repo:get_versions/1`, `hex_repo:get_package/2` and `hex_repo:get_policy/2` decompress the registry response with `zlib:gunzip/1` and decode the signed envelope before verifying its signature. A mirror doesn't have the repository's private key, but it chooses the compressed bytes, so a small response decompresses into an envelope of any size before the signature check rejects it.\n\n`hex_api` decodes responses with the `application/vnd.hex+erlang` content type through `hex_safe_binary_to_term:safe_binary_to_term/1`, which calls `binary_to_term(Binary, [safe])`. The `safe` option prevents atom creation, but it accepts compressed terms and doesn't limit the size of the decoded term, and the check that rejects functions and ports runs after the term has been built. The fix for CVE-2026-21619 added the `safe` option and that check without bounding the decoded size.\n\nThis issue affects rebar3: from 3.9.1 before 3.27.3; hex: from 2.1.0 before 2.5.2; hex_core: from 0.1.0 before 0.20.0."}],"value":"Improper Handling of Highly Compressed Data (Data Amplification) vulnerability in hexpm hex_core allows an untrusted repository mirror, or a server answering hex_core's API requests, to exhaust the memory of the Erlang VM running hex_core. The same code is vendored in Hex (mix_hex_repo, mix_hex_api) and rebar3 (r3_hex_repo, r3_hex_api).\n\nhex_repo:get_names/1, hex_repo:get_versions/1, hex_repo:get_package/2 and hex_repo:get_policy/2 decompress the registry response with zlib:gunzip/1 and decode the signed envelope before verifying its signature. A mirror doesn't have the repository's private key, but it chooses the compressed bytes, so a small response decompresses into an envelope of any size before the signature check rejects it.\n\nhex_api decodes responses with the application/vnd.hex+erlang content type through hex_safe_binary_to_term:safe_binary_to_term/1, which calls binary_to_term(Binary, [safe]). The safe option prevents atom creation, but it accepts compressed terms and doesn't limit the size of the decoded term, and the check that rejects functions and ports runs after the term has been built. The fix for CVE-2026-21619 added the safe option and that check without bounding the decoded size.\n\nThis issue affects rebar3: from 3.9.1 before 3.27.3; hex: from 2.1.0 before 2.5.2; hex_core: from 0.1.0 before 0.20.0."}],"impacts":[{"capecId":"CAPEC-130","descriptions":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p>A mirror can make every registry fetch allocate memory far beyond the size of its response: in a test against Hex main 851b938, which vendors this code, a 65 KB registry response decompressed into a 64 MiB envelope before the signature check failed. The API server, or an attacker who can alter its responses, can do the same with API responses: 8 KB of compressed Erlang term format decoded into a list of 4.2 million elements. Large enough responses stop the Erlang VM, which fails the build tool command or the program using hex_core. No package code has to run.</p>"},{"base64":false,"type":"text/markdown","value":"A mirror can make every registry fetch allocate memory far beyond the size of its response: in a test against Hex main 851b938, which vendors this code, a 65 KB registry response decompressed into a 64 MiB envelope before the signature check failed. The API server, or an attacker who can alter its responses, can do the same with API responses: 8 KB of compressed Erlang term format decoded into a list of 4.2 million elements. Large enough responses stop the Erlang VM, which fails the build tool command or the program using hex_core. No package code has to run."}],"value":"A mirror can make every registry fetch allocate memory far beyond the size of its response: in a test against Hex main 851b938, which vendors this code, a 65 KB registry response decompressed into a 64 MiB envelope before the signature check failed. The API server, or an attacker who can alter its responses, can do the same with API responses: 8 KB of compressed Erlang term format decoded into a list of 4.2 million elements. Large enough responses stop the Erlang VM, which fails the build tool command or the program using hex_core. No package code has to run."}]}],"metrics":[{"cvssV4_0":{"Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","Safety":"NOT_DEFINED","attackComplexity":"LOW","attackRequirements":"PRESENT","attackVector":"NETWORK","baseScore":2.1,"baseSeverity":"LOW","privilegesRequired":"NONE","providerUrgency":"NOT_DEFINED","subAvailabilityImpact":"NONE","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","userInteraction":"ACTIVE","valueDensity":"NOT_DEFINED","vectorString":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N","version":"4.0","vulnAvailabilityImpact":"LOW","vulnConfidentialityImpact":"NONE","vulnIntegrityImpact":"NONE","vulnerabilityResponseEffort":"NOT_DEFINED"},"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}]}],"problemTypes":[{"descriptions":[{"cweId":"CWE-409","description":"CWE-409 Improper Handling of Highly Compressed Data (Data Amplification)","lang":"en","type":"CWE"}]}],"providerMetadata":{"dateUpdated":"2026-10-12T18:16:57.155Z","orgId":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","shortName":"EEF"},"references":[{"name":"GitHub Advisory","tags":["related","vendor-advisory"],"url":"https://github.com/hexpm/hex_core/security/advisories/GHSA-7c4r-cgf9-9jmq"},{"name":"EEF CNA record for CVE-2026-105274","tags":["related"],"url":"https://cna.erlef.org/cves/CVE-2026-105274.html"},{"name":"OSV record EEF-CVE-2026-105274","tags":["related"],"url":"https://osv.dev/vulnerability/EEF-CVE-2026-105274"},{"name":"Introducing commit 209c02e in erlang/rebar3","tags":["related"],"url":"https://github.com/erlang/rebar3/commit/209c02ec57c2cc3207ee0174c3af3675b8dc8f79"},{"name":"Fix commit 360838a in erlang/rebar3","tags":["patch"],"url":"https://github.com/erlang/rebar3/commit/360838a22f5b3a88c0358207f2923059bcbb3afb"},{"name":"Introducing commit fbb6d9d in hexpm/hex_core","tags":["related"],"url":"https://github.com/hexpm/hex_core/commit/fbb6d9de472e5edb8d6fb6b32a91cb266137892e"},{"name":"Fix commit ebe25d1 in hexpm/hex_core","tags":["patch"],"url":"https://github.com/hexpm/hex_core/commit/ebe25d110717f6a3addba5232cd4a7dc1c76b628"},{"name":"Introducing commit 671f695 in hexpm/hex","tags":["related"],"url":"https://github.com/hexpm/hex/commit/671f695ac548ed01f5828c2a739ecaa942b21007"},{"name":"Fix commit d8b60ee in hexpm/hex","tags":["patch"],"url":"https://github.com/hexpm/hex/commit/d8b60eee97abb119d525306f048969a217d793a5"}],"solutions":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p>Upgrade hex_core to 0.20.0 or later. Registry resources larger than 16 MiB after decompression are rejected with <code>{too_big_uncompressed, MaxSize}</code>, configurable with <code>registry_max_uncompressed_size</code>.</p>\n<p>Upgrade Hex to 2.5.2 or later, which vendors hex_core 0.20.0. No rebar3 release vendors hex_core 0.20.0 yet.</p>"},{"base64":false,"type":"text/markdown","value":"Upgrade hex_core to 0.20.0 or later. Registry resources larger than 16 MiB after decompression are rejected with `{too_big_uncompressed, MaxSize}`, configurable with `registry_max_uncompressed_size`.\n\nUpgrade Hex to 2.5.2 or later, which vendors hex_core 0.20.0. No rebar3 release vendors hex_core 0.20.0 yet."}],"value":"Upgrade hex_core to 0.20.0 or later. Registry resources larger than 16 MiB after decompression are rejected with {too_big_uncompressed, MaxSize}, configurable with registry_max_uncompressed_size.\n\nUpgrade Hex to 2.5.2 or later, which vendors hex_core 0.20.0. No rebar3 release vendors hex_core 0.20.0 yet."}],"source":{"discovery":"UNKNOWN"},"title":"hex_core decompresses registry and Erlang term API responses without size limits","workarounds":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p>Point repository URLs at repo.hex.pm or a mirror you operate, and the API URL at hex.pm.</p>"},{"base64":false,"type":"text/markdown","value":"Point repository URLs at repo.hex.pm or a mirror you operate, and the API URL at hex.pm."}],"value":"Point repository URLs at repo.hex.pm or a mirror you operate, and the API URL at hex.pm."}],"x_proofOfConcept":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<ol>\n<li>Point a repository at a loopback mirror (in Hex, <code>HEX_MIRROR_URL</code>) that answers <code>/packages/probe</code> with a 65,268-byte gzip stream decompressing to a 67,108,872-byte signed envelope with a 64 MiB payload and a one-byte signature.</li>\n<li><code>Hex.Repo.get_package(\"hexpm\", \"probe\", nil)</code>, which calls the vendored <code>hex_repo:get_package/2</code>, returns <code>{:error, :bad_signature}</code> after allocating the envelope. Peak RSS was 234 MiB, against 96 MiB for a 1,030-byte invalid envelope.</li>\n<li>Answer an API request with <code>content-type: application/vnd.hex+erlang</code> and 8,178 bytes of compressed Erlang term format encoding a list of 4,194,304 elements. <code>mix_hex_api:get/2</code> accepts the decoded term, and BEAM memory rises from 58 MiB to 272 MiB.</li>\n</ol>"},{"base64":false,"type":"text/markdown","value":"1. Point a repository at a loopback mirror (in Hex, `HEX_MIRROR_URL`) that answers `/packages/probe` with a 65,268-byte gzip stream decompressing to a 67,108,872-byte signed envelope with a 64 MiB payload and a one-byte signature.\n2. `Hex.Repo.get_package(\"hexpm\", \"probe\", nil)`, which calls the vendored `hex_repo:get_package/2`, returns `{:error, :bad_signature}` after allocating the envelope. Peak RSS was 234 MiB, against 96 MiB for a 1,030-byte invalid envelope.\n3. Answer an API request with `content-type: application/vnd.hex+erlang` and 8,178 bytes of compressed Erlang term format encoding a list of 4,194,304 elements. `mix_hex_api:get/2` accepts the decoded term, and BEAM memory rises from 58 MiB to 272 MiB."}],"value":"* Point a repository at a loopback mirror (in Hex, HEX_MIRROR_URL) that answers /packages/probe with a 65,268-byte gzip stream decompressing to a 67,108,872-byte signed envelope with a 64 MiB payload and a one-byte signature.\n* Hex.Repo.get_package(\"hexpm\", \"probe\", nil), which calls the vendored hex_repo:get_package/2, returns {:error, :bad_signature} after allocating the envelope. Peak RSS was 234 MiB, against 96 MiB for a 1,030-byte invalid envelope.\n* Answer an API request with content-type: application/vnd.hex+erlang and 8,178 bytes of compressed Erlang term format encoding a list of 4,194,304 elements. mix_hex_api:get/2 accepts the decoded term, and BEAM memory rises from 58 MiB to 272 MiB."}],"x_technicalAnalysis":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<ol>\n<li><code>hex_repo:get_protobuf/3</code>, used by <code>get_names/1</code>, <code>get_versions/1</code>, <code>get_package/2</code> and <code>get_policy/2</code>, calls <code>zlib:gunzip/1</code> on the whole response body with no output limit.</li>\n<li><code>hex_repo:decode/4</code> then calls <code>hex_registry:decode_and_verify_signed/2</code>, which decodes the protobuf envelope, copying its payload and signature, before checking the signature.</li>\n<li><code>hex_api:request/4</code> passes every response whose content type contains <code>application/vnd.hex+erlang</code> to <code>hex_safe_binary_to_term:safe_binary_to_term/1</code>.</li>\n<li><code>safe_binary_to_term/1</code> calls <code>binary_to_term(Binary, [safe])</code>, which decompresses compressed terms and builds the whole term, and only then walks it to reject functions and ports.</li>\n</ol>"},{"base64":false,"type":"text/markdown","value":"1. `hex_repo:get_protobuf/3`, used by `get_names/1`, `get_versions/1`, `get_package/2` and `get_policy/2`, calls `zlib:gunzip/1` on the whole response body with no output limit.\n2. `hex_repo:decode/4` then calls `hex_registry:decode_and_verify_signed/2`, which decodes the protobuf envelope, copying its payload and signature, before checking the signature.\n3. `hex_api:request/4` passes every response whose content type contains `application/vnd.hex+erlang` to `hex_safe_binary_to_term:safe_binary_to_term/1`.\n4. `safe_binary_to_term/1` calls `binary_to_term(Binary, [safe])`, which decompresses compressed terms and builds the whole term, and only then walks it to reject functions and ports."}],"value":"* hex_repo:get_protobuf/3, used by get_names/1, get_versions/1, get_package/2 and get_policy/2, calls zlib:gunzip/1 on the whole response body with no output limit.\n* hex_repo:decode/4 then calls hex_registry:decode_and_verify_signed/2, which decodes the protobuf envelope, copying its payload and signature, before checking the signature.\n* hex_api:request/4 passes every response whose content type contains application/vnd.hex+erlang to hex_safe_binary_to_term:safe_binary_to_term/1.\n* safe_binary_to_term/1 calls binary_to_term(Binary, [safe]), which decompresses compressed terms and builds the whole term, and only then walks it to reject functions and ports."}]}},"cveMetadata":{"assignerOrgId":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","assignerShortName":"EEF","cveId":"CVE-2026-105274","datePublished":"2026-10-12T16:43:58.730Z","dateReserved":"2026-10-10T13:00:02.355Z","dateUpdated":"2026-10-12T18:16:57.155Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"}