CVE-2025-15079

Description

A flaw was found in curl. When performing SSH-based transfers using SCP or SFTP, libcurl could mistakenly connect to hosts not listed in the user-specified knownhosts file. This occurs if the host is present in the libssh global knownhosts file, effectively bypassing the intended host verification. This could allow a remote attacker to connect to an untrusted host, potentially leading to information disclosure or man-in-the-middle attacks.

Statement

This vulnerability is rated Important for Red Hat because libcurl, when configured for SSH-based transfers (SCP/SFTP) with a user-specified knownhosts file, may bypass this configuration and accept connections to hosts present in the system-wide libssh global knownhosts file. This could lead to unintended host trust in specific deployment scenarios.

Mitigation

To mitigate this issue, ensure that the system-wide `libssh` global knownhosts file (`/etc/ssh/ssh_known_hosts`) does not contain entries for untrusted hosts. Alternatively, avoid using `libcurl` for SCP or SFTP transfers in environments where strict enforcement of a user-specified knownhosts file is critical and the system-wide knownhosts file cannot be fully controlled. Services relying on `libssh` for host key verification may need to be restarted to apply the changes.

Common Vulnerability Scoring System (CVSS) Score Details

Info alert:Important note

CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).

CVSS v3 Score Breakdown

Red HatNVDcve.org
Base Score8.1N/A5.3
Attack VectorNetworkN/ANetwork
Attack ComplexityLowN/AHigh
Privileges RequiredLowN/ANone
User InteractionNoneN/ARequired
ScopeUnchangedN/AUnchanged
ConfidentialityHighN/AHigh
Integrity ImpactHighN/ANone
Availability ImpactNoneN/ANone

Vector

Red Hat: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N

cve.org: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N

Understanding the Weakness (CWE)

Access Control

Technical Impact: Bypass Protection Mechanism

Frequently Asked Questions

Want to get errata notifications? Sign up here.