Related Vulnerabilities: CVE-2016-8615  

If cookie state is written into a cookie jar file that is later read back and used for subsequent requests, a malicious HTTP server can inject new cookies for arbitrary domains into said cookie jar. The issue pertains to the function that loads cookies into memory, which reads the specified file into a fixed-size buffer in a line-by-line manner using the fgets() function. If an invocation of fgets() cannot read the whole line into the destination buffer due to it being too small, it truncates the output. This way, a very long cookie (name + value) sent by a malicious server would be stored in the file and subsequently that cookie could be read partially and crafted correctly, it could be treated as a different cookie for another server.

Severity Medium

Remote Yes

Type Content spoofing

Description

If cookie state is written into a cookie jar file that is later read back and used for subsequent requests, a malicious HTTP server can inject new cookies for arbitrary domains into said cookie jar.

The issue pertains to the function that loads cookies into memory, which reads the specified file into a fixed-size buffer in a line-by-line manner using the fgets() function. If an invocation of fgets() cannot read the whole line into the destination buffer due to it being too small, it truncates the output. This way, a very long cookie (name + value) sent by a malicious server would be stored in the file and subsequently that cookie could be read partially and crafted correctly, it could be treated as a different cookie for another server.

AVG-66 lib32-libcurl-gnutls 7.50.3-1 7.51.0-1 High Fixed

AVG-65 libcurl-gnutls 7.50.3-1 7.51.0-1 High Fixed

AVG-63 lib32-libcurl-compat 7.50.3-1 7.51.0-1 High Fixed

AVG-62 libcurl-compat 7.50.3-1 7.51.0-1 High Fixed

AVG-61 lib32-curl 7.50.3-1 7.51.0-1 High Fixed

AVG-60 curl 7.50.3-1 7.51.0-1 High Fixed

03 Nov 2016 ASA-201611-9 AVG-65 libcurl-gnutls High multiple issues

03 Nov 2016 ASA-201611-8 AVG-62 libcurl-compat High multiple issues

03 Nov 2016 ASA-201611-7 AVG-60 curl High multiple issues

02 Nov 2016 ASA-201611-5 AVG-63 lib32-libcurl-compat High multiple issues

02 Nov 2016 ASA-201611-4 AVG-61 lib32-curl High multiple issues

03 Nov 2016 ASA-201611-10 AVG-66 lib32-libcurl-gnutls High multiple issues

https://curl.haxx.se/docs/adv_20161102A.html