Use after free via shared cookies
libcurl explicitly allows users to share cookies between multiple easy handles that are concurrently employed by different threads. When cookies to be sent to a server are collected, the matching function collects all cookies to send and the cookie lock is released immediately afterwards. That function however only returns a list with *references* back to the original strings for name, value, path and so on. Therefore, if another thread quickly takes the lock and frees one of the original cookie structs together with its strings, a use after free can occur and lead to information disclosure. Another thread can also replace the contents of the cookies from separate HTTP responses or API calls.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2016-8623
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 1 Nov 2026, 16:54 UTC · Revision 1
Source evidence
libcurl explicitly allows users to share cookies between multiple easy handles that are concurrently employed by different threads. When cookies to be sent to a server are collected, the matching function collects all cookies to send and the cookie lock is released immediately afterwards. That function however only returns a list with *references* back to the original strings for name, value, path and so on. Therefore, if another thread quickly takes the lock and frees one of the original cookie structs together with its strings, a use after free can occur and lead to information disclosure. Another thread can also replace the contents of the cookies from separate HTTP responses or API calls.
osv:CURL-CVE-2016-8623
Complete source record
{
"id": "47734bf430ef2781a1290779d83a17efbcd632f313dc0dec5b2fb7aaf6feb600",
"url": "https://osv.dev/vulnerability/CURL-CVE-2016-8623",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "Use after free via shared cookies",
"summary": "libcurl explicitly allows users to share cookies between multiple easy handles that are concurrently employed by different threads. When cookies to be sent to a server are collected, the matching function collects all cookies to send and the cookie lock is released immediately afterwards. That function however only returns a list with *references* back to the original strings for name, value, path and so on. Therefore, if another thread quickly takes the lock and frees one of the original cookie structs together with its strings, a use after free can occur and lead to information disclosure. Another thread can also replace the contents of the cookies from separate HTTP responses or API calls.",
"evidence": "osv:CURL-CVE-2016-8623",
"products": [],
"severity": "high",
"structured": {
"id": "CURL-CVE-2016-8623",
"aliases": [
"CURL-CVE-2016-8623",
"CVE-2016-8623"
],
"affected": [
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "7.10.7"
},
{
"fixed": "7.51.0"
}
]
},
{
"repo": "https://github.com/curl/curl.git",
"type": "GIT",
"events": [
{
"introduced": "41ae97e710f728495a1d6adba6476c21b94c4881"
},
{
"fixed": "c5be3d7267c725dbd093ff3a883e07ee8cf2a1d5"
}
]
}
],
"versions": [
"7.50.3",
"7.50.2",
"7.50.1",
"7.50.0",
"7.49.1",
"7.49.0",
"7.48.0",
"7.47.1",
"7.47.0",
"7.46.0",
"7.45.0",
"7.44.0",
"7.43.0",
"7.42.1",
"7.42.0",
"7.41.0",
"7.40.0",
"7.39.0",
"7.38.0",
"7.37.1",
"7.37.0",
"7.36.0",
"7.35.0",
"7.34.0",
"7.33.0",
"7.32.0",
"7.31.0",
"7.30.0",
"7.29.0",
"7.28.1",
"7.28.0",
"7.27.0",
"7.26.0",
"7.25.0",
"7.24.0",
"7.23.1",
"7.23.0",
"7.22.0",
"7.21.7",
"7.21.6",
"7.21.5",
"7.21.4",
"7.21.3",
"7.21.2",
"7.21.1",
"7.21.0",
"7.20.1",
"7.20.0",
"7.19.7",
"7.19.6",
"7.19.5",
"7.19.4",
"7.19.3",
"7.19.2",
"7.19.1",
"7.19.0",
"7.18.2",
"7.18.1",
"7.18.0",
"7.17.1",
"7.17.0",
"7.16.4",
"7.16.3",
"7.16.2",
"7.16.1",
"7.16.0",
"7.15.5",
"7.15.4",
"7.15.3",
"7.15.2",
"7.15.1",
"7.15.0",
"7.14.1",
"7.14.0",
"7.13.2",
"7.13.1",
"7.13.0",
"7.12.3",
"7.12.2",
"7.12.1",
"7.12.0",
"7.11.2",
"7.11.1",
"7.11.0",
"7.10.8",
"7.10.7",
"curl-7_50_3",
"curl-7_50_2",
"curl-7_50_1",
"curl-7_50_0",
"curl-7_49_1",
"curl-7_49_0",
"curl-7_48_0",
"curl-7_47_1",
"curl-7_47_0",
"curl-7_46_0",
"curl-7_45_0",
"curl-7_44_0",
"curl-7_43_0",
"curl-7_42_1",
"curl-7_42_0",
"curl-7_41_0",
"curl-7_40_0",
"curl-7_39_0",
"curl-7_38_0",
"curl-7_37_1",
"curl-7_37_0",
"curl-7_36_0",
"curl-7_35_0",
"curl-7_34_0",
"curl-7_33_0",
"curl-7_32_0",
"curl-7_31_0",
"curl-7_30_0",
"curl-7_29_0",
"curl-7_28_1",
"curl-7_28_0",
"curl-7_27_0",
"curl-7_26_0",
"curl-7_25_0",
"curl-7_24_0",
"curl-7_23_1",
"curl-7_23_0",
"curl-7_22_0",
"curl-7_21_7",
"curl-7_21_6",
"curl-7_21_5",
"curl-7_21_4",
"curl-7_21_3",
"curl-7_21_2",
"curl-7_21_1",
"curl-7_21_0",
"curl-7_20_1",
"curl-7_20_0",
"curl-7_19_7",
"curl-7_19_6",
"curl-7_19_5",
"curl-7_19_4",
"curl-7_19_3",
"curl-7_19_2",
"curl-7_19_1",
"curl-7_19_0",
"curl-7_18_2",
"curl-7_18_1",
"curl-7_18_0",
"curl-7_17_1",
"curl-7_17_0",
"curl-7_17_0-preldapfix",
"curl-7_16_4",
"curl-7_16_3",
"curl-7_16_2",
"curl-7_16_1",
"curl-7_16_0",
"curl-7_15_6-prepipeline",
"curl-7_15_5",
"curl-7_15_4",
"curl-7_15_3",
"curl-7_15_2",
"curl-7_15_1",
"curl-7_15_0",
"curl-7_14_1",
"curl-7_14_0",
"curl-7_13_2",
"curl-7_13_1",
"before_ftp_statemachine",
"curl-7_13_0",
"curl-7_12_3",
"curl-7_12_2",
"curl-7_12_1",
"curl-7_12_0",
"curl-7_11_2",
"curl-7_11_1",
"curl-7_11_0",
"curl-7_10_8",
"curl-7_10_7"
],
"database_specific": {
"source": "https://curl.se/docs/CURL-CVE-2016-8623.json",
"vanir_signatures": [
{
"id": "CURL-CVE-2016-8623-19d4743c",
"digest": {
"length": 146,
"function_hash": "177480805511348010839002178038820145454"
},
"source": "https://github.com/curl/curl.git/commit/c5be3d7267c725dbd093ff3a883e07ee8cf2a1d5",
"target": {
"file": "lib/cookie.c",
"function": "Curl_cookie_cleanup"
},
"deprecated": false,
"signature_type": "Function",
"signature_version": "v1"
},
{
"id": "CURL-CVE-2016-8623-1c8e2d94",
"digest": {
"threshold": 0.9,
"line_hashes": [
"94576883660926785402051766470788784684",
"98133636392656808293540217109383809803",
"330054786837398613498893107474960270385",
"262530475838869603294873074465789716260",
"89670776507343356930977542012472611327"
]
},
"source": "https://github.com/curl/curl.git/commit/c5be3d7267c725dbd093ff3a883e07ee8cf2a1d5",
"target": {
"file": "lib/cookie.h"
},
"deprecated": false,
"signature_type": "Line",
"signature_version": "v1"
},
{
"id": "CURL-CVE-2016-8623-24888e71",
"digest": {
"threshold": 0.9,
"line_hashes": [
"291512818806243377981805011340984740126",
"236687239981651546406322995772152553770",
"184049739219249913186505779661534077664",
"211180055067366803349033212157372845799",
"214586419585997379247673802127943215469",
"50207798356989955690271320627780045145",
"80938580632071485166654494958305481923",
"52752092919805114673865672273245131231",
"122777988952992856668137288867562268705",
"226898548424316682739604414752235209286",
"126652733816890146006960286123266755091",
"11470038790654704786765097754853869292",
"226790024936707861514235741540253525582",
"256203084583505545606542519700626900855",
"109538588884300928955626580692100771102",
"272850778902348204472381760421781013646",
"67285741456772442012070940876174401461",
"256548499216434642778890602657819621346",
"254742258870146659112422410654451857439",
"126952067871521750569535128267995567854",
"299976291246814156328283957064168417560",
"30220257090525348498130906478060388860",
"250801280524809389991684401126763725914",
"23600832991221329304539707835936344313",
"291686685489691939957439766095374874421",
"218659387833439788688625700084881833414",
"284880309552635427134038785907482123026",
"308121340973356247315433409297856162146",
"44927363077320982091076132764276187309",
"119455102042000691034528956951243107492",
"56705371398227486309514116777277421301",
"209148117100728707679289541687407718480",
"152666299844515263114341057436582775178",
"165856248968001144679351152860546308804",
"57116032738490580659698453969833851791",
"7706779600508907297078288913904138610",
"279166351216707584751840044136145466638"
]
},
"source": "https://github.com/curl/curl.git/commit/c5be3d7267c725dbd093ff3a883e07ee8cf2a1d5",
"target": {
"file": "lib/cookie.c"
},
"deprecated": false,
"signature_type": "Line",
"signature_version": "v1"
},
{
"id": "CURL-CVE-2016-8623-7df983fd",
"digest": {
"length": 1348,
"function_hash": "177155206249589770279717678324494247704"
},
"source": "https://github.com/curl/curl.git/commit/c5be3d7267c725dbd093ff3a883e07ee8cf2a1d5",
"target": {
"file": "lib/cookie.c",
"function": "Curl_cookie_getlist"
},
"deprecated": false,
"signature_type": "Function",
"signature_version": "v1"
},
{
"id": "CURL-CVE-2016-8623-8041ab96",
"digest": {
"length": 19324,
"function_hash": "288748130743108654551779948688252879730"
},
"source": "https://github.com/curl/curl.git/commit/c5be3d7267c725dbd093ff3a883e07ee8cf2a1d5",
"target": {
"file": "lib/http.c",
"function": "Curl_http"
},
"deprecated": false,
"signature_type": "Function",
"signature_version": "v1"
},
{
"id": "CURL-CVE-2016-8623-8c2156ca",
"digest": {
"length": 179,
"function_hash": "293624403663990740895739774145376037590"
},
"source": "https://github.com/curl/curl.git/commit/c5be3d7267c725dbd093ff3a883e07ee8cf2a1d5",
"target": {
"file": "lib/cookie.c",
"function": "Curl_cookie_freelist"
},
"deprecated": false,
"signature_type": "Function",
"signature_version": "v1"
},
{
"id": "CURL-CVE-2016-8623-ad9e4ccd",
"digest": {
"threshold": 0.9,
"line_hashes": [
"195744683021307321373091673240830809353",
"195561597212400334746633028083228516782",
"315954831076496102806852733282833424193",
"64625772878659104678128282527315165567"
]
},
"source": "https://github.com/curl/curl.git/commit/c5be3d7267c725dbd093ff3a883e07ee8cf2a1d5",
"target": {
"file": "lib/http.c"
},
"deprecated": false,
"signature_type": "Line",
"signature_version": "v1"
},
{
"id": "CURL-CVE-2016-8623-f05ab2ed",
"digest": {
"length": 140,
"function_hash": "149462472186955670041145034488237604387"
},
"source": "https://github.com/curl/curl.git/commit/c5be3d7267c725dbd093ff3a883e07ee8cf2a1d5",
"target": {
"file": "lib/cookie.c",
"function": "Curl_cookie_clearall"
},
"deprecated": false,
"signature_type": "Function",
"signature_version": "v1"
}
],
"vanir_signatures_modified": "2026-10-27T01:28:33Z"
}
}
],
"modified": "2026-10-27T01:28:33.787495715Z",
"provider": "osv",
"references": [],
"provider_metadata": {
"CWE": {
"id": "CWE-416",
"desc": "Use After Free"
},
"URL": "https://curl.se/docs/CVE-2016-8623.json",
"www": "https://curl.se/docs/CVE-2016-8623.html",
"affects": "lib",
"package": "curl",
"severity": "High",
"last_affected": "7.50.3"
}
},
"related_cves": [
{
"value": "CVE-2016-8623",
"evidence": "/aliases"
}
],
"security_relevant": true,
"severity_evidence": "/database_specific/severity"
},
"source_id": "core-osv",
"document_id": 459154,
"published_at": "2016-11-02T08:00:00+00:00"
}