Skip to content

Allowlist bypass in directory downloads (TOCTOU)

Moderate
johrstrom published GHSA-vjpg-34px-gjrw Nov 19, 2025

Package

ondemand

Affected versions

<= 4.0.7
<= 3.1.15

Patched versions

4.0.8
3.1.16

Description

Summary

An authenticated user can bypass the OOD file browser allowlist (OOD_ALLOWLIST_PATH) when downloading directories as zip files. The allowlist is checked for all files before any zipping happens, which allows modifications to already validated files, such as replacing files with symlinks.

Details

The allowlist is checked in PosixFile, but the actual reading of files happens later, in FilesController.
Since the files seem to be processed in alphabetical order, intentionally causing delays to increase the time window for file replacement is trivial. When reading the files for zipping, symlinks are dereferenced without any validation against the allowlist.

PoC

To reproduce:

  1. Configure the allowlist, e.g. OOD_ALLOWLIST_PATH: "/home"
  2. Prepare the directory to download:
mkdir dir
# Create a larger file to intentionally cause a delay in the processing of the files to zip
dd if=/dev/random of=dir/big_file bs=10M count=10
touch dir/file_to_replace
  1. Start a download of the directory in OOD file browser.
  2. Immediately replace file_to_replace with a symlink to your target file (using dnf.log as an example): ln -sf /var/log/dnf.log dir/file_to_replace. Note that the name of the symlink must be alphabetically after the name of the large file to be processed later.
  3. The file_to_replace file in the downloaded zip now contains the contents of /var/log/dnf.log on the OOD server.

Impact

This vulnerability impacts sites that use the file browser allowlists in all current versions of OOD. However, files accessed are still protected by the UNIX permissions.

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N

CVE ID

CVE-2025-62724

Weaknesses

UNIX Symbolic Link (Symlink) Following

The product, when opening a file or directory, does not sufficiently account for when the file is a symbolic link that resolves to a target outside of the intended control sphere. This could allow an attacker to cause the product to operate on unauthorized files. Learn more on MITRE.

Time-of-check Time-of-use (TOCTOU) Race Condition

The product checks the state of a resource before using that resource, but the resource's state can change between the check and the use in a way that invalidates the results of the check. Learn more on MITRE.

Credits