CVE-2023-28322

3.7 LOW

📋 TL;DR

This vulnerability in curl versions before 8.1.0 causes information disclosure when reusing a handle between PUT and POST requests. It affects applications using libcurl for HTTP(S) transfers where the same handle is reused with different request methods, potentially causing the wrong data to be sent or memory corruption.

💻 Affected Systems

Products:
  • curl
  • libcurl
  • any software using libcurl
Versions: All versions before 8.1.0
Operating Systems: All platforms where curl/libcurl is used
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects applications that reuse the same curl handle between PUT and POST requests with CURLOPT_READFUNCTION and CURLOPT_POSTFIELDS.

📦 What is this software?

Curl by Haxx

curl is a command-line tool and library for transferring data with URLs. It supports numerous protocols including HTTP, HTTPS, FTP, and more, making it essential for API testing, web scraping, and automated data transfers.

Learn more about Curl →

Macos by Apple

macOS is Apple's desktop and laptop operating system powering Mac computers used by millions of professionals, developers, creative professionals, and enterprise users worldwide. Built on a Unix foundation with the Darwin kernel and modern Cocoa frameworks, macOS delivers a seamless ecosystem integr...

Learn more about Macos →

Macos by Apple

macOS is Apple's desktop and laptop operating system powering Mac computers used by millions of professionals, developers, creative professionals, and enterprise users worldwide. Built on a Unix foundation with the Darwin kernel and modern Cocoa frameworks, macOS delivers a seamless ecosystem integr...

Learn more about Macos →

Macos by Apple

macOS is Apple's desktop and laptop operating system powering Mac computers used by millions of professionals, developers, creative professionals, and enterprise users worldwide. Built on a Unix foundation with the Darwin kernel and modern Cocoa frameworks, macOS delivers a seamless ecosystem integr...

Learn more about Macos →

⚠️ Risk & Real-World Impact

🔴

Worst Case

Application sends sensitive data to unintended recipients or crashes due to memory corruption (use-after-free), potentially leading to data exposure or denial of service.

🟠

Likely Case

Application sends incorrect data during POST requests after previously using the same handle for PUT requests, causing functional errors or data integrity issues.

🟢

If Mitigated

With proper handle management or updated curl, no impact occurs as the logic flaw is corrected.

🌐 Internet-Facing: MEDIUM - Affects web clients and servers using libcurl for HTTP(S) communication, but exploitation requires specific handle reuse patterns.
🏢 Internal Only: MEDIUM - Similar risk for internal services using affected curl versions, though attack surface may be more limited.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires control over both the application's curl usage patterns and the data being transferred. No public exploits have been documented.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: curl 8.1.0 and later

Vendor Advisory: https://curl.se/docs/CVE-2023-28322.html

Restart Required: No

Instructions:

1. Update curl to version 8.1.0 or later. 2. For Linux systems: Use package manager (apt-get upgrade curl, yum update curl, etc.). 3. For compiled applications: Recompile against libcurl >= 8.1.0. 4. Verify update with curl --version.

🔧 Temporary Workarounds

Avoid handle reuse between PUT and POST

all

Do not reuse the same curl handle when switching from PUT to POST requests. Create separate handles for different request methods.

Reset handle properly between requests

all

Use curl_easy_reset() or create new handles instead of reusing existing ones when changing request methods.

🧯 If You Can't Patch

  • Implement strict handle management: Never reuse handles between PUT and POST operations.
  • Add input validation and monitoring for unexpected data in POST requests to detect potential exploitation.

🔍 How to Verify

Check if Vulnerable:

Check curl version with 'curl --version' or 'curl -V'. If version is earlier than 8.1.0, the system is vulnerable.

Check Version:

curl --version | head -1

Verify Fix Applied:

After updating, run 'curl --version' and confirm version is 8.1.0 or higher. Test application functionality with handle reuse scenarios.

📡 Detection & Monitoring

Log Indicators:

  • Unexpected data in POST requests after PUT operations
  • Application errors related to curl handle reuse
  • Memory corruption errors in applications using libcurl

Network Indicators:

  • POST requests containing data from previous PUT operations
  • Inconsistent data patterns in HTTP(S) transfers

SIEM Query:

source="application_logs" AND ("curl" OR "libcurl") AND ("POST" NEAR "PUT") AND ("error" OR "unexpected" OR "corruption")

🔗 References

📤 Share & Export