Skip to main content

CVE-2025-40908: CWE-552 Files or Directories Accessible to External Parties in TINITA YAML::LibYAML

Critical
VulnerabilityCVE-2025-40908cvecve-2025-40908cwe-552
Published: Sun Jun 01 2025 (06/01/2025, 13:41:48 UTC)
Source: CVE Database V5
Vendor/Project: TINITA
Product: YAML::LibYAML

Description

YAML-LibYAML prior to 0.903.0 for Perl uses 2-args open, allowing existing files to be modified

AI-Powered Analysis

AILast updated: 07/09/2025, 00:57:50 UTC

Technical Analysis

CVE-2025-40908 is a critical security vulnerability identified in the YAML::LibYAML Perl module maintained by the TINITA project. The vulnerability arises from the use of a two-argument form of the open() function in versions prior to 0.903.0. This legacy usage allows an attacker to open existing files for writing without proper safeguards, enabling unauthorized modification of files. The underlying issue is classified under CWE-552, which pertains to files or directories being accessible to external parties, potentially leading to unauthorized data modification. The vulnerability has a CVSS v3.1 base score of 9.1, indicating a critical severity level. The vector metrics (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N) reveal that the vulnerability is remotely exploitable over the network without any privileges or user interaction, and it impacts confidentiality and integrity to a high degree, though it does not affect availability. Exploitation could allow attackers to overwrite or tamper with sensitive files, potentially leading to data breaches, unauthorized code execution, or disruption of application logic relying on YAML configurations. No known exploits are currently reported in the wild, and no official patches have been linked yet, emphasizing the need for immediate attention from users of the affected module. The vulnerability affects all versions prior to 0.903.0, with the affectedVersions field indicating '0' which likely means all versions before the fixed release. This issue is particularly critical for environments where YAML::LibYAML is used to parse or manage configuration files or data that influence system behavior or security controls.

Potential Impact

For European organizations, the impact of CVE-2025-40908 can be significant, especially for those relying on Perl applications that utilize YAML::LibYAML for configuration management or data serialization. Unauthorized modification of YAML files could lead to compromised application configurations, leakage of sensitive information, or insertion of malicious data that could escalate into broader system compromise. Sectors such as finance, healthcare, government, and critical infrastructure, which often use Perl-based legacy systems or automation scripts, may face increased risks of data integrity breaches and operational disruptions. The remote exploitability without authentication or user interaction means attackers can potentially target exposed services or supply chain components that incorporate this library. Given the high confidentiality and integrity impact, organizations could suffer regulatory penalties under GDPR if personal data is exposed or altered. Additionally, the lack of availability impact suggests systems may continue running but with corrupted or maliciously altered data, complicating detection and response efforts.

Mitigation Recommendations

European organizations should immediately audit their software dependencies to identify usage of YAML::LibYAML versions prior to 0.903.0. Where possible, upgrade to version 0.903.0 or later once available to ensure the vulnerability is patched. In the interim, restrict network exposure of services that utilize this library, especially those accepting YAML input from untrusted sources. Implement strict input validation and sanitization to prevent malicious YAML payloads from triggering file modifications. Employ file system access controls and mandatory access control (MAC) policies to limit the ability of processes to write to critical files, thereby reducing the impact of exploitation. Monitoring and alerting on unexpected file changes in directories used by YAML::LibYAML can help detect exploitation attempts early. Additionally, consider containerization or sandboxing of applications using this library to contain potential damage. Engage with vendors or maintainers for timely patch releases and apply them promptly. Finally, incorporate this vulnerability into incident response plans and conduct tabletop exercises simulating exploitation scenarios to improve readiness.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
CPANSec
Date Reserved
2025-04-16T09:05:34.360Z
Cvss Version
null
State
PUBLISHED

Threat ID: 683c58f0182aa0cae2156967

Added to database: 6/1/2025, 1:43:12 PM

Last enriched: 7/9/2025, 12:57:50 AM

Last updated: 8/20/2025, 7:56:35 AM

Views: 75

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