Libretro Libretro-Common CDFS Cue Track Out-of-Bounds Write Vulnerability Allowing Arbitrary Code Execution

Vulnerability

A buffer overflow vulnerability has been identified in the CDFS .cue file parser of Libretro Libretro-Common, all platforms. The issue arises in the 'cdfs_open_cue_track' function, where 'memcpy' is used to copy file paths from the .cue file into a buffer. If the file path exceeds the maximum allowed length, this creates an out-of-bounds write condition. Remote attackers can exploit this vulnerability by crafting a .cue file with an excessively long file path, leading to stack-based buffer overflow and potential execution of arbitrary code.

Impact

Exploitation of this vulnerability causes a stack-based buffer overflow, which can be leveraged to execute arbitrary code.

Reproduction

To reproduce this vulnerability, create a .cue file that includes a file path exceeding the maximum path length. The .cue file should be formatted to include this long path, which will trigger the buffer overflow when the file is processed by the 'cdfs_open_cue_track' function in the CDFS parser.

Remediation

The vulnerability can be mitigated by limiting the 'memcpy' operation to 'PATH_MAX_LENGTH - 1' bytes and ensuring that the copied string is null-terminated.

Added: Sep 1, 2025, 7:19 PM
Updated: Sep 1, 2025, 7:19 PM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
10.0
exploitability
8.7
remediation
0.0
relevance
0.4
threat
6.4
urgency
2.9
incentive
5.8

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.