hex_core's default HTTP adapter doesn't verify TLS certificates on OTP 24 and 25
Severity and exploitation
KEV coverage does not rule out exploitation.
Assessment vector
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:L/VA:N/SC:N/SI:N/SA:NAssessment vector
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:L/VA:N/SC:N/SI:N/SA:NSeverity
medium5.9CVSS measures technical severity, not the likelihood of an attack.
Known exploitation
Not listed in the checked CISA KEV catalog
Absence from CISA KEV does not rule out attacks.
Public exploit
Not established by this record
Missing evidence does not mean no public exploit exists.
Remediation
Package fixes recorded
Fix versions are recorded for 1 of 1 mapped packages. Check each release branch and any separate product guidance.
What this means
hex_core's default HTTP adapter doesn't verify TLS certificates on OTP 24 and 25, allowing an attacker to impersonate servers. This affects hex_core versions before 0.20.0.
Summarized by @cf/meta/llama-3.3-70b-instruct-fp8-fast. Verify details against the original sources.Attack conditions
No attack-condition excerpt has been identified here. Review the full source description and references for authentication, network access, and configuration requirements.
Review supporting sources →Affected versions
Check the exact model, release, and any platform requirements against your installation.
hexpm · EEF
hex_core
1 range
hexpm · EEF
hex_core
Package identity
pkg:hex/hex_coreExplore hex_core →Identity supplied by EEF. Version matching requires compatible range evidence.
Compare with this publisher’s ranges. This does not inspect your installation.
affected
0.1.0 → before 0.20.0
semver versions
Other versions: unaffected
Product identifiers (CPE)
cpe:2.3:a:hexpm:hex_core:*:*:*:*:*:*:*:*hexpm · EEF
hex_core
1 range
hexpm · EEF
hex_core
Package identity
pkg:github/hexpm/hex_coreIdentity supplied by EEF. Version matching requires compatible range evidence.
Compare with this publisher’s ranges. This does not inspect your installation.
affected
fbb6d9de472e5edb8d6fb6b32a91cb266137892e → before b7b3a42defb4ed8e20a5c68a4412ce68a95b7938
git versions
Other versions: unaffected
Product identifiers (CPE)
cpe:2.3:a:hexpm:hex_core:*:*:*:*:*:*:*:*Packages
Compare each installed version with the publisher’s affected ranges. Where a fix is recorded, choose the appropriate release branch and test compatibility before upgrading.
| Affected range | Recorded fix |
|---|---|
| From 0.1.0 before 0.20.0Semantic versions | 0.20.0 |
Version evidence: OSV · EEF-CVE-2026-103502
View original version evidence (44 explicit versions)
Source version evidence
This source records affected versions without identifying a package ecosystem and name. This evidence is not used for package matching.
What to do
Compare your installed product and version with the affected versions above. A matching product name alone does not confirm exposure.
Use the recorded fix for your release branch. Review the publisher’s instructions and test compatibility before upgrading.
Upgrade hex_core to 0.20.0 or later. On OTP 24, or on OTP 25 without the operating system's CA certificates, HTTPS requests through hex_http_httpc then fail with {error, {cacerts_unavailable, Reason}} unless the adapter config has ssl options.
Pass ssl options that verify the server certificate in the adapter config, for example {hex_http_httpc, #{http_options => [{ssl, SslOpts}]}}, use another HTTP adapter, or run on OTP 26 or later.
cve.new guidance unless attributed to a publisher. This page does not inspect your installation.
Public exploit evidence
No public exploit reference is identified in the imported evidence. This is not a claim that no exploit exists.
Original source description
Read the full publisher description
Summary
Improper Certificate Validation vulnerability in hexpm hex_core allows an attacker who can intercept HTTPS connections to impersonate hex.pm, repo.hex.pm or any other repository or API server to programs that use hex_core's default HTTP adapter on Erlang/OTP 24, or on OTP 25 when the operating system's CA certificates can't be loaded.
hex_core:default_config/0 selects the built-in hex_http_httpc adapter. For an HTTPS request whose adapter config has no ssl option, hex_http_httpc:http_options/2 builds options that verify the server certificate against public_key:cacerts_get/0. When that call raises, the adapter prints a warning and sends the request without ssl options, so httpc uses the defaults of the ssl application, which before OTP 26 don't verify the server certificate. public_key:cacerts_get/0 doesn't exist on OTP 24, so every HTTPS request falls back there, and on OTP 25 it raises when no CA store is found. hex_core versions before 0.11.0 never set ssl options, so they don't verify the server certificate on OTP 25 and earlier whether or not a CA store is found.
The fallback was intended and documented, but the documentation didn't make clear that it meant no certificate verification. Since hex_core 0.8.2 the README has warned that the built-in httpc adapter "has insecure default settings" and recommended other HTTP clients, and the adapter prints "using default ssl options which are insecure" on every request that falls back. hex_core 0.11.0 added certificate verification with the changelog entry "Use secure SSL defaults for OTP 25+". Neither the README nor the warning says that the server certificate isn't verified, the README doesn't say which OTP versions the warning applies to, and on OTP 25 without CA certificates the warning tells users to upgrade to OTP 25 or later, which they already run. This advisory is published so that users who took those notices as general advice know their HTTPS requests weren't authenticated.
This issue affects hex_core: from 0.1.0 before 0.20.0.
Details
hex_core:default_config/0setshttp_adapterto{hex_http_httpc, #{profile => default}}.hex_http_httpc:request/5andhex_http_httpc:request_to_file/6build their httpc options withhttp_options/2.- For an
httpsURI whose adapter config has nosslentry inhttp_options,http_options/2adds{ssl, [{verify, verify_peer}, {cacerts, public_key:cacerts_get()}, ...]}inside atry. - When
public_key:cacerts_get/0raises (undefon OTP 24; an error on OTP 25 when no CA store is found), thecatchprints a warning withio:format/1and returns the options withoutssl. - httpc then uses the
sslapplication's defaults, which areverify_nonebefore OTP 26, and completes the handshake with any certificate. - hex_core before 0.11.0 (e57b4fb) had no step 3: it never passed
ssloptions, so step 5 applied on every OTP version before 26.
Proof of concept
- Compile
src/hex_http.erlandsrc/hex_http_httpc.erlfrom hex_core main 4fbc5d1 in theerlang:24Docker image and runhex_http_httpc:request(get, <<"https://self-signed.badssl.com/">>, #{}, undefined, #{profile => default})after starting inets and ssl. - The adapter prints
[hex_http_httpc] using default ssl options which are insecure.and returns{ok, {200, Headers, Body}}from the server with the self-signed certificate. - In the
erlang:25image with an empty tmpfs mounted on/etc/ssl/certs,public_key:cacerts_get/0raises and the request also returns{ok, {200, ...}}. - In the
erlang:25image with the CA store present (150 certificates), the same request fails with{error, {failed_connect, ...}}after aBad Certificatealert.
Impact
An attacker on the network path between a program using hex_core's default adapter and a Hex repository or API server completes the TLS handshake with any certificate. It receives the API keys, OAuth tokens and repository keys the program sends, and can alter API requests and responses. Registry signatures, which hex_core verifies by default, still prevent changes to registry contents. Hex and rebar3 aren't affected because they configure their own HTTP adapters.
Workarounds
Pass ssl options that verify the server certificate in the adapter config, for example {hex_http_httpc, #{http_options => [{ssl, SslOpts}]}}, use another HTTP adapter, or run on OTP 26 or later.
Configurations
Affects programs that use the hex_http_httpc adapter, the default in hex_core:default_config/0, without an ssl option in the adapter's http_options, on OTP 24, or on OTP 25 when public_key:cacerts_get/0 fails. hex_core versions before 0.11.0 are affected on OTP 25 and earlier whether or not the CA certificates load. On OTP 26 and later the ssl defaults verify the server certificate. Hex and rebar3 vendor hex_core but configure their own HTTP adapters, so they aren't affected.
Solutions
Upgrade hex_core to 0.20.0 or later. On OTP 24, or on OTP 25 without the operating system's CA certificates, HTTPS requests through hex_http_httpc then fail with {error, {cacerts_unavailable, Reason}} unless the adapter config has ssl options.
References
6 sourcesInside the record
Evidence available
Describes the evidence in this view, not whether the product is safe.
Original records
CVE-2026-103502View the latest unmodified CVE JSON from the official source. It may be newer than this imported page.
cve.new JSON →Underlying weaknesses
The source’s classification of what caused the vulnerability.
Environment requirements
These conditions apply together as specified by the publisher. A matching product name alone does not establish exposure.
EEF · platform conditions
All conditions must hold
Any condition may hold
Vulnerable product
cpe:2.3:a:hexpm:hex_core:*:*:*:*:*:*:*:*From (inclusive): 0.1.0
Before: 0.20.0
Applicability preview
[
{
"nodes": [
{
"cpeMatch": [
{
"criteria": "cpe:2.3:a:hexpm:hex_core:*:*:*:*:*:*:*:*",
"versionEndExcluding": "0.20.0",
"versionStartIncluding": "0.1.0",
"vulnerable": true
}
],
"negate": false,
"operator": "OR"
}
],
"operator": "AND"
}
]Contributing organizations · 2
Assigning organization
Additional data publisher
Timeline
All times UTCAdvisory published
Publication date supplied by the source.
Source updated
Latest modification date supplied by the source.
Last imported by cve.new
Latest catalog import, not the date we first saw this advisory.
What changed
Follow changesLarge field values are marked as truncated previews. Original source snapshots remain retained.