{"id":"CURL-CVE-2016-8622","summary":"URL unescape heap overflow via integer truncation","details":"The URL percent-encoding decode function in libcurl is called\n`curl_easy_unescape`. Internally, even if this function would be made to\nallocate a destination buffer larger than 2GB, it would return that new length\nin a signed 32-bit integer variable, thus the length would get either\ntruncated only or both truncated and turned negative. That could then lead\nto libcurl writing outside of its heap based buffer.\n\nThis can be triggered by a user on a 64-bit system if the user can send in a\ncustom (large) URL to a libcurl using program.","aliases":["CVE-2016-8622"],"modified":"2026-05-29T05:40:50.769705Z","published":"2016-11-02T08:00:00Z","database_specific":{"last_affected":"7.50.3","URL":"https://curl.se/docs/CVE-2016-8622.json","CWE":{"desc":"Heap-based Buffer Overflow","id":"CWE-122"},"affects":"both","www":"https://curl.se/docs/CVE-2016-8622.html","severity":"Medium","package":"curl"},"affected":[{"ranges":[{"type":"SEMVER","events":[{"introduced":"7.24.0"},{"fixed":"7.51.0"}]},{"type":"GIT","repo":"https://github.com/curl/curl.git","events":[{"introduced":"75ca568fa1c19de4c5358fed246686de8467c238"},{"fixed":"53e71e47d6b81650d26ec33a58d0dca24c7ffb2c"}]}],"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","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"],"database_specific":{"vanir_signatures":[{"digest":{"line_hashes":["280124531524246386527463823407672458088","244082486092391395949212374394278231640","18892424654263822203327588007609056877","278598452881503400689901175441770113675","32713264157592440947457122841913801357"],"threshold":0.9},"signature_version":"v1","id":"CURL-CVE-2016-8622-51da99ae","deprecated":false,"signature_type":"Line","source":"https://github.com/curl/curl.git/commit/53e71e47d6b81650d26ec33a58d0dca24c7ffb2c","target":{"file":"lib/escape.c"}},{"digest":{"line_hashes":["85531600349396079370279736753091447969","240830358155089182095150392992557439355","33138173598708421065494355058414820438","104582267161206224574623770745516623688","39351097544233358387518424182548325223","219042475641267385453072629984152282414","169441797146195818311475194170666887725","185145315697199084722351916857164174407","307687845678070680086753193956844669239","300950789835624101760419461884698879278","340069576809379767714208729173611481098","256718428584902334278504435026204753579"],"threshold":0.9},"signature_version":"v1","id":"CURL-CVE-2016-8622-8f3c4e22","deprecated":false,"signature_type":"Line","source":"https://github.com/curl/curl.git/commit/53e71e47d6b81650d26ec33a58d0dca24c7ffb2c","target":{"file":"lib/dict.c"}},{"digest":{"function_hash":"243118882729615901503887179107051868975","length":316},"signature_version":"v1","id":"CURL-CVE-2016-8622-b17dc4f0","deprecated":false,"signature_type":"Function","source":"https://github.com/curl/curl.git/commit/53e71e47d6b81650d26ec33a58d0dca24c7ffb2c","target":{"file":"lib/escape.c","function":"curl_easy_unescape"}},{"digest":{"function_hash":"111198999320162444531431132207148947414","length":536},"signature_version":"v1","id":"CURL-CVE-2016-8622-e8a9880d","deprecated":false,"signature_type":"Function","source":"https://github.com/curl/curl.git/commit/53e71e47d6b81650d26ec33a58d0dca24c7ffb2c","target":{"file":"lib/dict.c","function":"unescape_word"}}],"source":"https://curl.se/docs/CURL-CVE-2016-8622.json","vanir_signatures_modified":"2026-05-29T05:40:50Z"}}],"schema_version":"1.7.5","credits":[{"name":"Cure53","type":"FINDER"},{"name":"Daniel Stenberg","type":"REMEDIATION_DEVELOPER"}]}