cbcvebase.
CVE-2013-0249
published 2013-03-08

CVE-2013-0249: Stack-based buffer overflow in the Curl_sasl_create_digest_md5_message function in lib/curl_sasl.c in curl and libcurl 7.26.0 through 7.28.1, when negotiating…

PriorityP258high7.5CVSS 2.0
AVNACLAuNCPIPAP
EXPLOIT
EPSS
22.91%
97.5th percentile
Stack-based buffer overflow in the Curl_sasl_create_digest_md5_message function in lib/curl_sasl.c in curl and libcurl 7.26.0 through 7.28.1, when negotiating SASL DIGEST-MD5 authentication, allows remote attackers to cause a denial of service (crash) and possibly execute arbitrary code via a long string in the realm parameter in a (1) POP3, (2) SMTP or (3) IMAP message.

Affected

14 ranges
VendorProductVersion rangeFixed in
canonicalubuntu_linux
debiancurl< curl 7.29.0-1 (bookworm)curl 7.29.0-1 (bookworm)
haxxcurl
haxxcurl
haxxcurl
haxxcurl
haxxcurl>= 0 < 7.29.0-17.29.0-1
haxxcurl>= 0 < 7.29.0-17.29.0-1
haxxcurl>= 0 < 7.29.0-17.29.0-1
haxxcurl>= 0 < 7.29.0-17.29.0-1
haxxlibcurl
haxxlibcurl
haxxlibcurl
haxxlibcurl

Detection & IOCsextracted from sources · hover to see the quote

port110/TCP
commandrealm="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",nonce="OA6MG9tEQGm2hh",qop="auth",algorithm=md5-sess,charset=utf-8
othercmVhbG09IkFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBIixub25jZT0iT0E2TUc5dEVRR20yaGgiLHFvcD0iYXV0aCIsYWxnb3JpdGhtPW1kNS1zZXNzLGNoYXJzZXQ9dXRmLTg=
pathlib/curl_sasl.c
  • Detect exploit attempts by monitoring POP3 traffic on port 110/TCP for SASL DIGEST-MD5 challenge responses containing an oversized 'realm' parameter (>= 128 bytes of padding).
  • Monitor for HTTP 302 redirects to POP3/SMTP/IMAP URLs (e.g., Location: pop3://...) which may be used to redirect curl clients into the vulnerable SASL DIGEST-MD5 code path.
  • Look for SASL DIGEST-MD5 server challenges (base64-encoded) sent over POP3/SMTP/IMAP that decode to a realm value significantly longer than expected; the PoC uses 128 'A' characters as the realm.
  • Identify vulnerable libcurl versions 7.26.0 through 7.28.1 in use; the crash manifests in Curl_sasl_create_digest_md5_message() with a stack smash (return address overwritten with 0x4141414141414141).
  • The attack chain begins with a crafted HTTP response redirecting to a POP3 URL; detect curl processes spawning connections to port 110/TCP following an HTTP redirect.
  • ·Disabling non-HTTP(S) protocols in libcurl via CURLOPT_PROTOCOLS and CURLOPT_REDIR_PROTOCOLS mitigates the attack vector entirely, as the vulnerability is only reachable via POP3, SMTP, or IMAP.
  • ·Red Hat Enterprise Linux 5 and 6 ship versions of curl that are not affected; detection/patching focus should be on curl 7.26.0–7.28.1.
  • ·Default compiler options (e.g., stack canaries, ASLR) on affected Ubuntu releases reduce the vulnerability from RCE to denial of service in practice.

CVSS provenance

nvdv2.07.5HIGHAV:N/AC:L/Au:N/C:P/I:P/A:P
osv7.5HIGH
vendor_debian7.5HIGH
vendor_redhat7.5HIGH
CVEs like this are exactly what “Exploited This Week” covers.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.