{"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 just\ntruncated or both truncated and turned negative. That could then lead to\nlibcurl 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-04-25T20:38:52.762925Z","published":"2016-11-02T08:00:00Z","database_specific":{"affects":"both","www":"https://curl.se/docs/CVE-2016-8622.html","package":"curl","last_affected":"7.50.3","severity":"Medium","URL":"https://curl.se/docs/CVE-2016-8622.json","CWE":{"desc":"Heap-based Buffer Overflow","id":"CWE-122"}},"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"],"database_specific":{"source":"https://curl.se/docs/CURL-CVE-2016-8622.json","vanir_signatures_modified":"2026-04-25T20:38:52Z","vanir_signatures":[{"source":"https://github.com/curl/curl.git/commit/53e71e47d6b81650d26ec33a58d0dca24c7ffb2c","signature_type":"Line","target":{"file":"lib/escape.c"},"signature_version":"v1","digest":{"line_hashes":["280124531524246386527463823407672458088","244082486092391395949212374394278231640","18892424654263822203327588007609056877","278598452881503400689901175441770113675","32713264157592440947457122841913801357"],"threshold":0.9},"id":"CURL-CVE-2016-8622-51da99ae","deprecated":false},{"source":"https://github.com/curl/curl.git/commit/53e71e47d6b81650d26ec33a58d0dca24c7ffb2c","signature_type":"Line","target":{"file":"lib/dict.c"},"signature_version":"v1","digest":{"line_hashes":["85531600349396079370279736753091447969","240830358155089182095150392992557439355","33138173598708421065494355058414820438","104582267161206224574623770745516623688","39351097544233358387518424182548325223","219042475641267385453072629984152282414","169441797146195818311475194170666887725","185145315697199084722351916857164174407","307687845678070680086753193956844669239","300950789835624101760419461884698879278","340069576809379767714208729173611481098","256718428584902334278504435026204753579"],"threshold":0.9},"id":"CURL-CVE-2016-8622-8f3c4e22","deprecated":false},{"source":"https://github.com/curl/curl.git/commit/53e71e47d6b81650d26ec33a58d0dca24c7ffb2c","signature_type":"Function","target":{"function":"curl_easy_unescape","file":"lib/escape.c"},"signature_version":"v1","digest":{"function_hash":"243118882729615901503887179107051868975","length":316},"id":"CURL-CVE-2016-8622-b17dc4f0","deprecated":false},{"source":"https://github.com/curl/curl.git/commit/53e71e47d6b81650d26ec33a58d0dca24c7ffb2c","signature_type":"Function","target":{"function":"unescape_word","file":"lib/dict.c"},"signature_version":"v1","digest":{"function_hash":"111198999320162444531431132207148947414","length":536},"id":"CURL-CVE-2016-8622-e8a9880d","deprecated":false}]}}],"schema_version":"1.7.5","credits":[{"name":"Cure53","type":"FINDER"},{"name":"Daniel Stenberg","type":"REMEDIATION_DEVELOPER"}]}