Custom cacerts or cacertfile do not restrict trust to the pinned CA in hackney
Improper Certificate Validation vulnerability in hackney_ssl in benoitc hackney allows an on-path attacker to impersonate a server pinned to a private certificate authority via a certificate chain that ends in a publicly trusted root. hackney adds {partial_chain, fun hackney_ssl:partial_chain/1} to every verify_peer configuration. The callback returns any certificate in the peer chain whose public key matches a root in the bundled certifi store as the trust anchor, and OTP honours that callback over the configured cacerts. hackney_ssl:merge_ssl_opts/3 kept the callback when the caller replaced the trust store with cacerts or cacertfile in ssl_options, so a connection pinned to a private CA still accepted any chain that carried a publicly trusted root. The hostname check still applies, so the attacker needs a publicly trusted certificate for the pinned hostname. This issue affects hackney: from 1.24.0 before 4.9.0.
- Products
- hackney
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2026-115693
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 30 Oct 2026, 08:58 UTC · Revision 1
Source evidence
Custom cacerts or cacertfile do not restrict trust to the pinned CA in hackney
core-cve · Original sourcePublished 26 Oct 2026, 13:49 UTC
Improper Certificate Validation vulnerability in hackney_ssl in benoitc hackney allows an on-path attacker to impersonate a server pinned to a private certificate authority via a certificate chain that ends in a publicly trusted root. hackney adds {partial_chain, fun hackney_ssl:partial_chain/1} to every verify_peer configuration. The callback returns any certificate in the peer chain whose public key matches a root in the bundled certifi store as the trust anchor, and OTP honours that callback over the configured cacerts. hackney_ssl:merge_ssl_opts/3 kept the callback when the caller replaced the trust store with cacerts or cacertfile in ssl_options, so a connection pinned to a private CA still accepted any chain that carried a publicly trusted root. The hostname check still applies, so the attacker needs a publicly trusted certificate for the pinned hostname. This issue affects hackney: from 1.24.0 before 4.9.0.
cve:CVE-2026-115693
hackney
Fixed versions: Not specified
hackney
Fixed versions: Not specified
Complete source record
{
"id": "583efe676f02f80e84d7085824d51fe332a8892e403b4b3570bcc4c2050e9498",
"url": "https://www.cve.org/CVERecord?id=CVE-2026-115693",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "Custom cacerts or cacertfile do not restrict trust to the pinned CA in hackney",
"summary": "Improper Certificate Validation vulnerability in hackney_ssl in benoitc hackney allows an on-path attacker to impersonate a server pinned to a private certificate authority via a certificate chain that ends in a publicly trusted root. hackney adds {partial_chain, fun hackney_ssl:partial_chain/1} to every verify_peer configuration. The callback returns any certificate in the peer chain whose public key matches a root in the bundled certifi store as the trust anchor, and OTP honours that callback over the configured cacerts. hackney_ssl:merge_ssl_opts/3 kept the callback when the caller replaced the trust store with cacerts or cacertfile in ssl_options, so a connection pinned to a private CA still accepted any chain that carried a publicly trusted root. The hostname check still applies, so the attacker needs a publicly trusted certificate for the pinned hostname. This issue affects hackney: from 1.24.0 before 4.9.0.",
"evidence": "cve:CVE-2026-115693",
"products": [
{
"name": {
"value": "hackney",
"evidence": "/containers/cna/affected/0/product"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": []
},
{
"name": {
"value": "hackney",
"evidence": "/containers/cna/affected/1/product"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": []
}
],
"severity": "critical",
"structured": {
"id": "CVE-2026-115693",
"aliases": [
"CVE-2026-115693"
],
"metrics": [
{
"format": "CVSS",
"cvssV4_0": {
"Safety": "NOT_DEFINED",
"version": "4.0",
"Recovery": "NOT_DEFINED",
"baseScore": 9.1,
"Automatable": "NOT_DEFINED",
"attackVector": "NETWORK",
"baseSeverity": "CRITICAL",
"valueDensity": "NOT_DEFINED",
"vectorString": "CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N",
"providerUrgency": "NOT_DEFINED",
"userInteraction": "NONE",
"attackComplexity": "HIGH",
"attackRequirements": "PRESENT",
"privilegesRequired": "NONE",
"subIntegrityImpact": "NONE",
"vulnIntegrityImpact": "HIGH",
"subAvailabilityImpact": "NONE",
"vulnAvailabilityImpact": "NONE",
"subConfidentialityImpact": "NONE",
"vulnConfidentialityImpact": "HIGH",
"vulnerabilityResponseEffort": "NOT_DEFINED"
},
"scenarios": [
{
"lang": "en",
"value": "GENERAL"
}
]
}
],
"affected": [
{
"cpes": [
"cpe:2.3:a:benoitc:hackney:*:*:*:*:*:*:*:*"
],
"repo": "https://github.com/benoitc/hackney",
"vendor": "benoitc",
"modules": [
"hackney_ssl"
],
"product": "hackney",
"versions": [
{
"status": "affected",
"version": "1.24.0",
"lessThan": "4.9.0",
"versionType": "semver"
}
],
"packageURL": "pkg:hex/hackney",
"packageName": "hackney",
"programFiles": [
"src/hackney_ssl.erl"
],
"collectionURL": "https://repo.hex.pm",
"defaultStatus": "unaffected",
"programRoutines": [
{
"name": "hackney_ssl:ssl_opts/2"
},
{
"name": "hackney_ssl:merge_ssl_opts/3"
},
{
"name": "hackney_ssl:partial_chain/1"
}
]
},
{
"cpes": [
"cpe:2.3:a:benoitc:hackney:*:*:*:*:*:*:*:*"
],
"repo": "https://github.com/benoitc/hackney",
"vendor": "benoitc",
"modules": [
"hackney_ssl"
],
"product": "hackney",
"versions": [
{
"status": "affected",
"version": "d8a9afcf5c3849904274e2eba1df56c63d1a1a0c",
"lessThan": "915eb5737e9c489d8fc22eec8cdae30e9b027be4",
"versionType": "git"
}
],
"packageURL": "pkg:github/benoitc/hackney",
"packageName": "benoitc/hackney",
"programFiles": [
"src/hackney_ssl.erl"
],
"collectionURL": "https://github.com",
"defaultStatus": "unaffected",
"programRoutines": [
{
"name": "hackney_ssl:ssl_opts/2"
},
{
"name": "hackney_ssl:merge_ssl_opts/3"
},
{
"name": "hackney_ssl:partial_chain/1"
}
]
}
],
"modified": "2026-10-26T13:49:29.374Z",
"provider": "cve",
"references": [
"https://github.com/benoitc/hackney/pull/978",
"https://cna.erlef.org/cves/CVE-2026-115693.html",
"https://osv.dev/vulnerability/EEF-CVE-2026-115693",
"https://github.com/benoitc/hackney/releases/tag/4.9.0",
"https://github.com/benoitc/hackney/commit/d8a9afcf5c3849904274e2eba1df56c63d1a1a0c",
"https://github.com/benoitc/hackney/commit/915eb5737e9c489d8fc22eec8cdae30e9b027be4"
],
"provider_metadata": {
"cna": {
"orgId": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
"shortName": "EEF",
"dateUpdated": "2026-10-26T13:49:29.374Z"
}
}
},
"related_cves": [
{
"value": "CVE-2026-115693",
"evidence": "/cveMetadata/cveId"
}
],
"security_relevant": true,
"severity_evidence": "/containers/cna/metrics"
},
"source_id": "core-cve",
"document_id": 307255,
"published_at": "2026-10-26T13:49:29.374+00:00"
}