Critical Vulnerabilities in curl Package: Remote Code Execution and Cookie Injection Risks
Summary
USN-6429-3: curl vulnerabilities. Affects curl versions < 8.2.1-1ubuntu3.1. Fixed in 8.2.1-1ubuntu3.1. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
curl is a widely used command-line tool and library for transferring data with URLs. It supports various protocols including HTTP, HTTPS, FTP, and more. The curl package is essential for developers and system administrators for tasks such as downloading files, testing APIs, and automating web interactions. However, vulnerabilities in curl can expose systems to significant risks, especially when configured to use proxies or when handling sensitive data like cookies.
Vulnerability Detail
The vulnerabilities identified in curl include a critical issue where it incorrectly handles hostnames when using a SOCKS5 proxy, potentially allowing a remote attacker to execute arbitrary code (CVE-2023-38545). Additionally, curl mishandles cookies when an application duplicates certain handles, enabling a local attacker to inject arbitrary cookies into subsequent connections (CVE-2023-38546). These vulnerabilities primarily affect Ubuntu 22.04 LTS and Ubuntu 23.04, but this update addresses them for Ubuntu 23.10.
How To Fix
Minimum fixed version
8.2.1-1ubuntu3.1
This is the first release that contains the fix.
sudo apt-get install --only-upgrade curl
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, users can avoid using SOCKS5 proxies with curl until the package is updated. Additionally, ensure that sensitive operations involving cookies are performed in a secure environment where local access is restricted.
Conclusion
The vulnerabilities in the curl package pose significant risks, including remote code execution and local cookie injection. Users are strongly advised to update to the patched version to mitigate these risks. By following the provided steps and considering the workarounds, users can enhance their security posture against these vulnerabilities.
See every vulnerability recorded for curl →
FAQ
The vulnerabilities could allow remote code execution and local cookie injection, leading to potential data breaches or unauthorized access.
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.
The vulnerabilities primarily affect Ubuntu 22.04 LTS and Ubuntu 23.04, but the update is available for Ubuntu 23.10.
Yes, avoid using SOCKS5 proxies with curl and restrict access to environments where cookie handling is performed.
You can refer to the original advisory details provided in USN-6429-1 for comprehensive information about the vulnerabilities.
References
Related vulnerabilities
Recent vulnerabilities recorded for curl.