Gentoo Logo

cURL: Off-by-one errors in URL handling


1.  Gentoo Linux Security Advisory

Version Information

Advisory Reference GLSA 200512-09 / cURL
Release Date December 16, 2005
Latest Revision December 16, 2005: 01
Impact low
Exploitable local
Package Vulnerable versions Unaffected versions Architecture(s)
net-misc/curl < 7.15.1 >= 7.15.1 All supported architectures

Related bugreports: #114710


cURL is vulnerable to local arbitrary code execution via buffer overflow due to the insecure parsing of URLs.

2.  Impact Information


cURL is a command line tool for transferring files with URL syntax, supporting numerous protocols.


Stefan Esser from the Hardened-PHP Project has reported a vulnerability in cURL that allows for a local buffer overflow when cURL attempts to parse specially crafted URLs. The URL can be specially crafted in one of two ways: the URL could be malformed in a way that prevents a terminating null byte from being added to either a hostname or path buffer; or the URL could contain a "?" separator in the hostname portion, which causes a "/" to be prepended to the resulting string.


An attacker capable of getting cURL to parse a maliciously crafted URL could cause a denial of service or execute arbitrary code with the privileges of the user making the call to cURL. An attacker could also escape open_basedir or safe_mode pseudo-restrictions when exploiting this problem from within a PHP program when PHP is compiled with libcurl.

3.  Resolution Information


There is no known workaround at this time.


All cURL users should upgrade to the latest version:

Code Listing 3.1: Resolution

# emerge --sync
# emerge --ask --oneshot --verbose ">=net-misc/curl-7.15.1"

4.  References


Page updated December 16, 2005

Summary: This is a Gentoo Linux Security Advisory

Security Team
Contact Address

Donate to support our development efforts.

Copyright 2001-2015 Gentoo Foundation, Inc. Questions, Comments? Contact us.