CVE-2022-32207: Business Logic Errors (CWE-840) in https://github.com/curl/curl
When curl < 7.84.0 saves cookies, alt-svc and hsts data to local files, it makes the operation atomic by finalizing the operation with a rename from a temporary name to the final target file name.In that rename operation, it might accidentally *widen* the permissions for the target file, leaving the updated file accessible to more users than intended.
AI Analysis
Technical Summary
CVE-2022-32207 is a critical security vulnerability identified in the curl utility, specifically in versions prior to 7.84.0. Curl is a widely used command-line tool and library for transferring data with URLs, supporting numerous protocols. The vulnerability arises from a business logic error (CWE-840) related to how curl saves cookies, alt-svc (alternative service), and HSTS (HTTP Strict Transport Security) data to local files. To ensure atomicity during these save operations, curl writes data to a temporary file and then renames this temporary file to the final target filename. However, during this rename operation, curl may inadvertently widen the file permissions of the target file, making it accessible to more users than originally intended. This unintended permission escalation can expose sensitive data stored in these files, such as cookies and security policies, to unauthorized users on the same system. The vulnerability has a CVSS 3.1 base score of 9.8, indicating critical severity, with an attack vector of network (AV:N), low attack complexity (AC:L), no privileges required (PR:N), no user interaction (UI:N), and impacts on confidentiality, integrity, and availability (C:H/I:H/A:H). Although no known exploits are currently reported in the wild, the potential for unauthorized data disclosure and manipulation is significant, especially in multi-user environments or shared systems. The issue was addressed and fixed in curl version 7.84.0 by correcting the file permission handling during the rename operation to prevent unintended permission widening.
Potential Impact
For European organizations, the impact of CVE-2022-32207 can be substantial, particularly for those relying on curl in multi-user environments such as shared servers, cloud platforms, or containerized applications. Unauthorized access to cookies and security policy files could lead to session hijacking, unauthorized access to web services, or manipulation of security configurations, undermining confidentiality and integrity. This is especially critical for sectors handling sensitive personal data under GDPR regulations, such as finance, healthcare, and government agencies. The vulnerability could also facilitate lateral movement within compromised networks if attackers gain access to sensitive authentication tokens or security policies. Given curl's ubiquitous presence in automation scripts, CI/CD pipelines, and backend services, the scope of affected systems is broad, increasing the risk of widespread exposure. The lack of required privileges or user interaction for exploitation further elevates the threat level, enabling remote attackers to exploit this vulnerability without authentication. Consequently, organizations may face regulatory penalties, reputational damage, and operational disruptions if this vulnerability is exploited.
Mitigation Recommendations
European organizations should prioritize upgrading all curl instances to version 7.84.0 or later to eliminate the vulnerability. Beyond patching, organizations should audit file permission settings on cookie, alt-svc, and HSTS data files to ensure they are not overly permissive, especially on shared systems. Implementing strict access controls and user segregation on systems running curl can reduce the risk of unauthorized access. Monitoring file system changes and employing file integrity monitoring tools can help detect unexpected permission changes. Additionally, organizations should review automation scripts and CI/CD pipelines that use curl to ensure they do not inadvertently expose sensitive data. Where feasible, running curl processes with the least privilege necessary and isolating them in containers or sandboxes can limit potential damage. Finally, educating system administrators and developers about secure file handling practices and the implications of this vulnerability will help prevent similar issues.
Affected Countries
Germany, France, United Kingdom, Netherlands, Italy, Spain, Poland, Sweden, Belgium, Ireland
CVE-2022-32207: Business Logic Errors (CWE-840) in https://github.com/curl/curl
Description
When curl < 7.84.0 saves cookies, alt-svc and hsts data to local files, it makes the operation atomic by finalizing the operation with a rename from a temporary name to the final target file name.In that rename operation, it might accidentally *widen* the permissions for the target file, leaving the updated file accessible to more users than intended.
AI-Powered Analysis
Technical Analysis
CVE-2022-32207 is a critical security vulnerability identified in the curl utility, specifically in versions prior to 7.84.0. Curl is a widely used command-line tool and library for transferring data with URLs, supporting numerous protocols. The vulnerability arises from a business logic error (CWE-840) related to how curl saves cookies, alt-svc (alternative service), and HSTS (HTTP Strict Transport Security) data to local files. To ensure atomicity during these save operations, curl writes data to a temporary file and then renames this temporary file to the final target filename. However, during this rename operation, curl may inadvertently widen the file permissions of the target file, making it accessible to more users than originally intended. This unintended permission escalation can expose sensitive data stored in these files, such as cookies and security policies, to unauthorized users on the same system. The vulnerability has a CVSS 3.1 base score of 9.8, indicating critical severity, with an attack vector of network (AV:N), low attack complexity (AC:L), no privileges required (PR:N), no user interaction (UI:N), and impacts on confidentiality, integrity, and availability (C:H/I:H/A:H). Although no known exploits are currently reported in the wild, the potential for unauthorized data disclosure and manipulation is significant, especially in multi-user environments or shared systems. The issue was addressed and fixed in curl version 7.84.0 by correcting the file permission handling during the rename operation to prevent unintended permission widening.
Potential Impact
For European organizations, the impact of CVE-2022-32207 can be substantial, particularly for those relying on curl in multi-user environments such as shared servers, cloud platforms, or containerized applications. Unauthorized access to cookies and security policy files could lead to session hijacking, unauthorized access to web services, or manipulation of security configurations, undermining confidentiality and integrity. This is especially critical for sectors handling sensitive personal data under GDPR regulations, such as finance, healthcare, and government agencies. The vulnerability could also facilitate lateral movement within compromised networks if attackers gain access to sensitive authentication tokens or security policies. Given curl's ubiquitous presence in automation scripts, CI/CD pipelines, and backend services, the scope of affected systems is broad, increasing the risk of widespread exposure. The lack of required privileges or user interaction for exploitation further elevates the threat level, enabling remote attackers to exploit this vulnerability without authentication. Consequently, organizations may face regulatory penalties, reputational damage, and operational disruptions if this vulnerability is exploited.
Mitigation Recommendations
European organizations should prioritize upgrading all curl instances to version 7.84.0 or later to eliminate the vulnerability. Beyond patching, organizations should audit file permission settings on cookie, alt-svc, and HSTS data files to ensure they are not overly permissive, especially on shared systems. Implementing strict access controls and user segregation on systems running curl can reduce the risk of unauthorized access. Monitoring file system changes and employing file integrity monitoring tools can help detect unexpected permission changes. Additionally, organizations should review automation scripts and CI/CD pipelines that use curl to ensure they do not inadvertently expose sensitive data. Where feasible, running curl processes with the least privilege necessary and isolating them in containers or sandboxes can limit potential damage. Finally, educating system administrators and developers about secure file handling practices and the implications of this vulnerability will help prevent similar issues.
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- hackerone
- Date Reserved
- 2022-06-01T00:00:00.000Z
- Cisa Enriched
- true
Threat ID: 682d9844c4522896dcbf374f
Added to database: 5/21/2025, 9:09:24 AM
Last enriched: 6/21/2025, 11:01:11 PM
Last updated: 7/31/2025, 8:31:01 AM
Views: 10
Related Threats
CVE-2025-8878: CWE-94 Improper Control of Generation of Code ('Code Injection') in properfraction Paid Membership Plugin, Ecommerce, User Registration Form, Login Form, User Profile & Restrict Content – ProfilePress
MediumCVE-2025-8143: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in pencidesign Soledad
MediumCVE-2025-8142: CWE-98 Improper Control of Filename for Include/Require Statement in PHP Program ('PHP Remote File Inclusion') in pencidesign Soledad
HighCVE-2025-8105: CWE-94 Improper Control of Generation of Code ('Code Injection') in pencidesign Soledad
HighCVE-2025-8719: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in reubenthiessen Translate This gTranslate Shortcode
MediumActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.