Skip to main content

CVE-2023-27538: Authentication Bypass by Primary Weakness (CWE-305) in https://github.com/curl/curl

High
VulnerabilityCVE-2023-27538cvecve-2023-27538cwe-305
Published: Thu Mar 30 2023 (03/30/2023, 00:00:00 UTC)
Source: CVE Database V5
Vendor/Project: n/a
Product: https://github.com/curl/curl

Description

An authentication bypass vulnerability exists in libcurl prior to v8.0.0 where it reuses a previously established SSH connection despite the fact that an SSH option was modified, which should have prevented reuse. libcurl maintains a pool of previously used connections to reuse them for subsequent transfers if the configurations match. However, two SSH settings were omitted from the configuration check, allowing them to match easily, potentially leading to the reuse of an inappropriate connection.

AI-Powered Analysis

AILast updated: 07/10/2025, 19:05:42 UTC

Technical Analysis

CVE-2023-27538 is a high-severity authentication bypass vulnerability affecting libcurl versions prior to 8.0.0. Libcurl is a widely used client-side URL transfer library that supports multiple protocols including SSH. The vulnerability arises from libcurl's connection reuse mechanism, which maintains a pool of previously established SSH connections to optimize performance by reusing connections for subsequent transfers if the configurations match. However, in versions before 8.0.0, libcurl omitted two SSH configuration options from its connection reuse checks. This omission means that even if these SSH options were changed between requests, libcurl could incorrectly reuse an existing SSH connection that should have been considered incompatible. This leads to an authentication bypass scenario where a connection established with one set of SSH options is reused despite changes that should prevent reuse, potentially allowing unauthorized access or data exposure. The vulnerability is classified under CWE-305 (Authentication Bypass by Primary Weakness). The CVSS v3.1 base score is 7.7 (High), with vector AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H, indicating that the attack requires local access (local vector), low attack complexity, no privileges or user interaction, and impacts confidentiality and availability significantly but not integrity. No known exploits are currently reported in the wild. The issue was fixed in libcurl version 8.0.0 by including the previously omitted SSH options in the connection reuse configuration checks to prevent inappropriate reuse of SSH connections.

Potential Impact

For European organizations, the impact of this vulnerability can be significant, especially for those relying on libcurl for automated data transfers over SSH in internal tools, CI/CD pipelines, or networked applications. An attacker with local access could exploit this flaw to bypass SSH authentication controls, potentially gaining unauthorized access to sensitive data or disrupting services by causing availability issues. This could lead to data breaches, unauthorized command execution, or denial of service conditions. Since libcurl is embedded in many software products and custom applications, the vulnerability could propagate through various layers of enterprise infrastructure. The confidentiality impact is high as attackers might access sensitive information transmitted over SSH connections. Availability impact is also high due to potential disruption of services relying on SSH connections. The vulnerability does not affect integrity directly but could facilitate further attacks that compromise system integrity. The requirement for local access limits remote exploitation but insider threats or compromised local accounts could leverage this vulnerability. European organizations with strict data protection regulations (e.g., GDPR) must consider the risk of data exposure and potential compliance violations.

Mitigation Recommendations

European organizations should prioritize upgrading libcurl to version 8.0.0 or later where the vulnerability is fixed. For environments where immediate upgrade is not feasible, organizations should audit and restrict local user access to systems running vulnerable libcurl versions to minimize exploitation risk. Additionally, organizations should review and harden SSH configurations to reduce reliance on connection reuse or disable connection pooling features if possible. Monitoring and logging SSH connection reuse events can help detect anomalous reuse patterns indicative of exploitation attempts. Incorporating application-level authentication and authorization checks beyond SSH can provide defense in depth. Security teams should also verify that third-party software and internal tools using libcurl are updated or patched accordingly. Finally, conducting penetration testing and vulnerability scanning focused on libcurl usage can identify vulnerable instances and confirm mitigation effectiveness.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
hackerone
Date Reserved
2023-03-02T00:00:00.000Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 68487f5e1b0bd07c3938fafc

Added to database: 6/10/2025, 6:54:22 PM

Last enriched: 7/10/2025, 7:05:42 PM

Last updated: 8/18/2025, 11:31:01 PM

Views: 14

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats