Schannel cipher selection surprise
libcurl lets applications specify which specific TLS ciphers to use in transfers, using the option called `CURLOPT_SSL_CIPHER_LIST`. The cipher selection is used for the TLS negotiation when a transfer is done involving any of the TLS based transfer protocols libcurl supports, such as HTTPS, FTPS, IMAPS, POP3S, SMTPS etc. Due to a mistake in the code, the selected cipher set was stored in a single "static" variable in the library, which has the surprising side-effect that if an application sets up multiple concurrent transfers, the last one that sets the ciphers accidentally controls the set used by all transfers. In a worst-case scenario, this weakens transport security significantly.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2021-22897
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 1 Nov 2026, 09:37 UTC · Revision 1
Source evidence
libcurl lets applications specify which specific TLS ciphers to use in transfers, using the option called `CURLOPT_SSL_CIPHER_LIST`. The cipher selection is used for the TLS negotiation when a transfer is done involving any of the TLS based transfer protocols libcurl supports, such as HTTPS, FTPS, IMAPS, POP3S, SMTPS etc. Due to a mistake in the code, the selected cipher set was stored in a single "static" variable in the library, which has the surprising side-effect that if an application sets up multiple concurrent transfers, the last one that sets the ciphers accidentally controls the set used by all transfers. In a worst-case scenario, this weakens transport security significantly.
osv:CURL-CVE-2021-22897
Complete source record
{
"id": "1d8184996c7d019ccc5ba4fc82619fb3f723512380fbdbbecde4624727aeff86",
"url": "https://osv.dev/vulnerability/CURL-CVE-2021-22897",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "Schannel cipher selection surprise",
"summary": "libcurl lets applications specify which specific TLS ciphers to use in transfers, using the option called `CURLOPT_SSL_CIPHER_LIST`. The cipher selection is used for the TLS negotiation when a transfer is done involving any of the TLS based transfer protocols libcurl supports, such as HTTPS, FTPS, IMAPS, POP3S, SMTPS etc. Due to a mistake in the code, the selected cipher set was stored in a single \"static\" variable in the library, which has the surprising side-effect that if an application sets up multiple concurrent transfers, the last one that sets the ciphers accidentally controls the set used by all transfers. In a worst-case scenario, this weakens transport security significantly.",
"evidence": "osv:CURL-CVE-2021-22897",
"products": [],
"severity": "low",
"structured": {
"id": "CURL-CVE-2021-22897",
"aliases": [
"CURL-CVE-2021-22897",
"CVE-2021-22897"
],
"affected": [
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "7.61.0"
},
{
"fixed": "7.77.0"
}
]
},
{
"repo": "https://github.com/curl/curl.git",
"type": "GIT",
"events": [
{
"introduced": "9aefbff30d280c60fc9d8cc3e0b2f19fc70a2f28"
},
{
"fixed": "bbb71507b7bab52002f9b1e0880bed6a32834511"
}
]
}
],
"versions": [
"7.76.1",
"7.76.0",
"7.75.0",
"7.74.0",
"7.73.0",
"7.72.0",
"7.71.1",
"7.71.0",
"7.70.0",
"7.69.1",
"7.69.0",
"7.68.0",
"7.67.0",
"7.66.0",
"7.65.3",
"7.65.2",
"7.65.1",
"7.65.0",
"7.64.1",
"7.64.0",
"7.63.0",
"7.62.0",
"7.61.1",
"7.61.0",
"curl-7_76_1",
"curl-7_76_0",
"curl-7_75_0",
"curl-7_74_0",
"curl-7_73_0",
"tiny-curl-7_72_0",
"curl-7_72_0",
"curl-7_71_1",
"curl-7_71_0",
"curl-7_70_0",
"curl-7_69_1",
"curl-7_69_0",
"curl-7_68_0",
"curl-7_67_0",
"curl-7_66_0",
"curl-7_65_3",
"curl-7_65_2",
"curl-7_65_1",
"curl-7_65_0",
"curl-7_64_1",
"curl-7_64_0",
"curl-7_63_0",
"curl-7_62_0",
"curl-7_61_1",
"curl-7_61_0"
],
"database_specific": {
"source": "https://curl.se/docs/CURL-CVE-2021-22897.json",
"vanir_signatures": [
{
"id": "CURL-CVE-2021-22897-369c7e73",
"digest": {
"threshold": 0.9,
"line_hashes": [
"169306282263403152476778100550579197303",
"297501274346842746936104394958035664195",
"115226342142473284132899468397361420315",
"234734752945961461342272917723384093426",
"295386562829775930098639946838584527244",
"219517661826067509758353138597803787494",
"244949559378790381198359763585636363260",
"332559676467627573058079295969579883439",
"172944519042723511467055631002959388061",
"49891809641561640485570718961026384269",
"303945483550590176791034946765591014847",
"160380589874126636249932610610053765267",
"202261837233141056431919104544500820999"
]
},
"source": "https://github.com/curl/curl.git/commit/bbb71507b7bab52002f9b1e0880bed6a32834511",
"target": {
"file": "lib/vtls/schannel.c"
},
"deprecated": false,
"signature_type": "Line",
"signature_version": "v1"
},
{
"id": "CURL-CVE-2021-22897-731f3de3",
"digest": {
"threshold": 0.9,
"line_hashes": [
"144288989636727895116566759813531481869",
"310223903940348029157260322620209786472",
"305687057856332765216788005169622682063",
"325657448106323421990448296138158547936",
"292286319081006362423274139499724779986",
"39604824998280807468150180221600407666",
"57176848086045237311152580885468675039"
]
},
"source": "https://github.com/curl/curl.git/commit/bbb71507b7bab52002f9b1e0880bed6a32834511",
"target": {
"file": "lib/vtls/schannel.h"
},
"deprecated": false,
"signature_type": "Line",
"signature_version": "v1"
},
{
"id": "CURL-CVE-2021-22897-a0ff66c6",
"digest": {
"length": 14322,
"function_hash": "211186878913764398743821657885986770610"
},
"source": "https://github.com/curl/curl.git/commit/bbb71507b7bab52002f9b1e0880bed6a32834511",
"target": {
"file": "lib/vtls/schannel.c",
"function": "schannel_connect_step1"
},
"deprecated": false,
"signature_type": "Function",
"signature_version": "v1"
},
{
"id": "CURL-CVE-2021-22897-f33500b8",
"digest": {
"length": 676,
"function_hash": "36431407875438539121636832984401189544"
},
"source": "https://github.com/curl/curl.git/commit/bbb71507b7bab52002f9b1e0880bed6a32834511",
"target": {
"file": "lib/vtls/schannel.c",
"function": "set_ssl_ciphers"
},
"deprecated": false,
"signature_type": "Function",
"signature_version": "v1"
}
],
"vanir_signatures_modified": "2026-10-25T01:04:45Z"
}
}
],
"modified": "2026-10-25T01:04:45.728326687Z",
"provider": "osv",
"references": [],
"provider_metadata": {
"CWE": {
"id": "CWE-488",
"desc": "Exposure of Data Element to Wrong Session"
},
"URL": "https://curl.se/docs/CVE-2021-22897.json",
"www": "https://curl.se/docs/CVE-2021-22897.html",
"award": {
"amount": "800",
"currency": "USD"
},
"issue": "https://hackerone.com/reports/1172857",
"affects": "both",
"package": "curl",
"severity": "Low",
"last_affected": "7.76.1"
}
},
"related_cves": [
{
"value": "CVE-2021-22897",
"evidence": "/aliases"
}
],
"security_relevant": true,
"severity_evidence": "/database_specific/severity"
},
"source_id": "core-osv",
"document_id": 444286,
"published_at": "2021-05-26T08:00:00+00:00"
}