CVE-2025-4748: CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in Erlang OTP
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') vulnerability in Erlang OTP (stdlib modules) allows Absolute Path Traversal, File Manipulation. This vulnerability is associated with program files lib/stdlib/src/zip.erl and program routines zip:unzip/1, zip:unzip/2, zip:extract/1, zip:extract/2 unless the memory option is passed. This issue affects OTP from OTP 17.0 until OTP 28.0.1, OTP 27.3.4.1 and OTP 26.2.5.13, corresponding to stdlib from 2.0 until 7.0.1, 6.2.2.1 and 5.2.3.4.
AI Analysis
Technical Summary
CVE-2025-4748 is a path traversal vulnerability identified in the Erlang Open Telecom Platform (OTP), specifically within the standard library (stdlib) modules responsible for handling ZIP file operations. The vulnerability arises from improper limitation of pathname inputs in the zip.erl source file, affecting the functions zip:unzip/1, zip:unzip/2, zip:extract/1, and zip:extract/2 unless the 'memory' option is explicitly used. This flaw allows an attacker to perform absolute path traversal, enabling unauthorized file manipulation on the host system. The vulnerability affects a wide range of OTP versions, from OTP 17.0 through OTP 28.0.1, including intermediate patch versions such as OTP 27.3.4.1 and OTP 26.2.5.13, and corresponding stdlib versions from 2.0 up to 7.0.1. The core issue is that the vulnerable functions do not adequately sanitize or restrict file paths extracted from ZIP archives, allowing crafted ZIP files to overwrite or create files outside the intended extraction directory. This can lead to arbitrary file writes, potentially overwriting critical system or application files, which may result in privilege escalation, code execution, or denial of service. The CVSS 4.0 base score is 4.8 (medium severity), reflecting that the attack vector is local (AV:L), requires low attack complexity (AC:L), no privileges (PR:N), but does require user interaction (UI:P). The vulnerability impacts confidentiality, integrity, and availability to a limited extent, with no scope change. No known exploits are currently reported in the wild, and no official patches have been linked yet. The vulnerability is particularly relevant to systems and applications that utilize Erlang OTP's ZIP handling capabilities, especially those that process untrusted ZIP files without the 'memory' option enabled, which mitigates the issue by avoiding filesystem extraction.
Potential Impact
For European organizations, the impact of CVE-2025-4748 can be significant in environments where Erlang OTP is used, particularly in telecommunications, messaging platforms, distributed systems, and backend services that rely on Erlang for concurrency and fault tolerance. Exploitation could allow attackers to manipulate files on affected systems, potentially leading to unauthorized code execution, data corruption, or service disruption. This is especially critical for organizations handling sensitive data or critical infrastructure, as file manipulation could compromise system integrity or availability. The requirement for local access and user interaction limits remote exploitation but does not eliminate risk, especially in multi-user environments or where attackers can trick users into processing malicious ZIP files. Given Erlang's widespread use in telecom and financial sectors, the vulnerability could affect core services, leading to operational disruptions and reputational damage. Additionally, the lack of patches at the time of disclosure increases the window of exposure. European organizations with legacy OTP versions or those slow to update are at higher risk. The medium severity rating suggests moderate urgency but should not be underestimated in high-value or sensitive environments.
Mitigation Recommendations
Avoid processing ZIP files from untrusted sources or implement strict validation of ZIP contents before extraction. Use the 'memory' option in zip:unzip and zip:extract functions to handle ZIP contents in-memory rather than extracting to the filesystem, mitigating path traversal risks. Upgrade Erlang OTP to versions beyond 28.0.1 once patches addressing this vulnerability are released. Implement application-level sandboxing or containerization to limit the impact of potential file manipulations. Monitor file system changes and maintain integrity checks on critical files to detect unauthorized modifications. Educate users and administrators about the risks of opening or processing ZIP files from unverified sources, reducing the likelihood of user interaction-based exploitation. Apply strict access controls and least privilege principles to limit the ability of compromised processes to affect critical system components. Review and harden backup and recovery procedures to quickly restore systems in case of exploitation.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Norway, Italy, Spain
CVE-2025-4748: CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in Erlang OTP
Description
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') vulnerability in Erlang OTP (stdlib modules) allows Absolute Path Traversal, File Manipulation. This vulnerability is associated with program files lib/stdlib/src/zip.erl and program routines zip:unzip/1, zip:unzip/2, zip:extract/1, zip:extract/2 unless the memory option is passed. This issue affects OTP from OTP 17.0 until OTP 28.0.1, OTP 27.3.4.1 and OTP 26.2.5.13, corresponding to stdlib from 2.0 until 7.0.1, 6.2.2.1 and 5.2.3.4.
AI-Powered Analysis
Technical Analysis
CVE-2025-4748 is a path traversal vulnerability identified in the Erlang Open Telecom Platform (OTP), specifically within the standard library (stdlib) modules responsible for handling ZIP file operations. The vulnerability arises from improper limitation of pathname inputs in the zip.erl source file, affecting the functions zip:unzip/1, zip:unzip/2, zip:extract/1, and zip:extract/2 unless the 'memory' option is explicitly used. This flaw allows an attacker to perform absolute path traversal, enabling unauthorized file manipulation on the host system. The vulnerability affects a wide range of OTP versions, from OTP 17.0 through OTP 28.0.1, including intermediate patch versions such as OTP 27.3.4.1 and OTP 26.2.5.13, and corresponding stdlib versions from 2.0 up to 7.0.1. The core issue is that the vulnerable functions do not adequately sanitize or restrict file paths extracted from ZIP archives, allowing crafted ZIP files to overwrite or create files outside the intended extraction directory. This can lead to arbitrary file writes, potentially overwriting critical system or application files, which may result in privilege escalation, code execution, or denial of service. The CVSS 4.0 base score is 4.8 (medium severity), reflecting that the attack vector is local (AV:L), requires low attack complexity (AC:L), no privileges (PR:N), but does require user interaction (UI:P). The vulnerability impacts confidentiality, integrity, and availability to a limited extent, with no scope change. No known exploits are currently reported in the wild, and no official patches have been linked yet. The vulnerability is particularly relevant to systems and applications that utilize Erlang OTP's ZIP handling capabilities, especially those that process untrusted ZIP files without the 'memory' option enabled, which mitigates the issue by avoiding filesystem extraction.
Potential Impact
For European organizations, the impact of CVE-2025-4748 can be significant in environments where Erlang OTP is used, particularly in telecommunications, messaging platforms, distributed systems, and backend services that rely on Erlang for concurrency and fault tolerance. Exploitation could allow attackers to manipulate files on affected systems, potentially leading to unauthorized code execution, data corruption, or service disruption. This is especially critical for organizations handling sensitive data or critical infrastructure, as file manipulation could compromise system integrity or availability. The requirement for local access and user interaction limits remote exploitation but does not eliminate risk, especially in multi-user environments or where attackers can trick users into processing malicious ZIP files. Given Erlang's widespread use in telecom and financial sectors, the vulnerability could affect core services, leading to operational disruptions and reputational damage. Additionally, the lack of patches at the time of disclosure increases the window of exposure. European organizations with legacy OTP versions or those slow to update are at higher risk. The medium severity rating suggests moderate urgency but should not be underestimated in high-value or sensitive environments.
Mitigation Recommendations
Avoid processing ZIP files from untrusted sources or implement strict validation of ZIP contents before extraction. Use the 'memory' option in zip:unzip and zip:extract functions to handle ZIP contents in-memory rather than extracting to the filesystem, mitigating path traversal risks. Upgrade Erlang OTP to versions beyond 28.0.1 once patches addressing this vulnerability are released. Implement application-level sandboxing or containerization to limit the impact of potential file manipulations. Monitor file system changes and maintain integrity checks on critical files to detect unauthorized modifications. Educate users and administrators about the risks of opening or processing ZIP files from unverified sources, reducing the likelihood of user interaction-based exploitation. Apply strict access controls and least privilege principles to limit the ability of compromised processes to affect critical system components. Review and harden backup and recovery procedures to quickly restore systems in case of exploitation.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- EEF
- Date Reserved
- 2025-05-15T08:36:54.783Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 684ffa37a8c921274384024b
Added to database: 6/16/2025, 11:04:23 AM
Last enriched: 6/16/2025, 11:19:33 AM
Last updated: 8/11/2025, 7:43:45 AM
Views: 21
Related Threats
CVE-2025-49559: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (CWE-22) in Adobe Adobe Commerce
MediumCVE-2025-49558: Time-of-check Time-of-use (TOCTOU) Race Condition (CWE-367) in Adobe Adobe Commerce
MediumCVE-2025-49557: Cross-site Scripting (Stored XSS) (CWE-79) in Adobe Adobe Commerce
HighCVE-2025-49556: Incorrect Authorization (CWE-863) in Adobe Adobe Commerce
HighCVE-2025-49555: Cross-Site Request Forgery (CSRF) (CWE-352) in Adobe Adobe Commerce
HighActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.