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 CWE-22 path traversal vulnerability found in the Erlang Open Telecom Platform (OTP) standard library, specifically within the zip module (lib/stdlib/src/zip.erl). The vulnerability exists in the zip:unzip/1, zip:unzip/2, zip:extract/1, and zip:extract/2 functions when extracting zip archives, except when the memory option is used. The flaw allows an attacker to specify absolute paths in zip entries, bypassing directory restrictions and enabling files to be written outside the intended extraction directory. This improper limitation of pathname can lead to unauthorized file creation or overwriting, potentially compromising system integrity or enabling further attacks. The affected OTP versions range from 17.0 up to 28.0.1, including specific stdlib versions from 2.0 to 7.0.1 and intermediate patches. Exploitation requires local access and user interaction but no privileges or authentication. The vulnerability has a CVSS 4.8 (medium) score, reflecting moderate impact and exploitation complexity. No public exploits have been reported yet, but the issue poses a risk to any system extracting untrusted zip files using vulnerable OTP versions.
Potential Impact
The primary impact of this vulnerability is unauthorized file manipulation through path traversal during zip extraction, which can lead to overwriting critical system or application files, insertion of malicious payloads, or disruption of service. This compromises system integrity and may facilitate privilege escalation or persistent malware installation if exploited in a multi-stage attack. Availability could be affected if critical files are overwritten or deleted. Confidentiality impact is limited but possible if sensitive files are overwritten or replaced with malicious versions. Since exploitation requires local access and user interaction, remote exploitation risk is low unless combined with other vulnerabilities or social engineering. Organizations relying on Erlang OTP for telecommunications, messaging platforms, or distributed systems could face operational disruptions or security breaches if this vulnerability is exploited.
Mitigation Recommendations
To mitigate this vulnerability, organizations should: 1) Upgrade Erlang OTP to a version beyond 28.0.1 or apply vendor patches once available. 2) Avoid extracting untrusted zip files using vulnerable OTP versions, especially without the memory option enabled. 3) Use the memory option in zip:unzip and zip:extract functions to prevent filesystem writes during extraction. 4) Implement strict input validation and sanitization on zip file contents before extraction. 5) Employ least privilege principles to limit user permissions on systems running Erlang OTP, reducing the impact of potential exploitation. 6) Monitor file system changes and audit logs for unusual file creation or modification patterns indicative of exploitation attempts. 7) Educate users about the risks of opening untrusted archives and enforce policies restricting such actions. These steps go beyond generic patching by emphasizing configuration options and operational controls to reduce attack surface.
Affected Countries
United States, Germany, Sweden, India, China, Brazil, United Kingdom, France, Japan, South Korea
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
Machine-generated threat intelligence
Technical Analysis
CVE-2025-4748 is a CWE-22 path traversal vulnerability found in the Erlang Open Telecom Platform (OTP) standard library, specifically within the zip module (lib/stdlib/src/zip.erl). The vulnerability exists in the zip:unzip/1, zip:unzip/2, zip:extract/1, and zip:extract/2 functions when extracting zip archives, except when the memory option is used. The flaw allows an attacker to specify absolute paths in zip entries, bypassing directory restrictions and enabling files to be written outside the intended extraction directory. This improper limitation of pathname can lead to unauthorized file creation or overwriting, potentially compromising system integrity or enabling further attacks. The affected OTP versions range from 17.0 up to 28.0.1, including specific stdlib versions from 2.0 to 7.0.1 and intermediate patches. Exploitation requires local access and user interaction but no privileges or authentication. The vulnerability has a CVSS 4.8 (medium) score, reflecting moderate impact and exploitation complexity. No public exploits have been reported yet, but the issue poses a risk to any system extracting untrusted zip files using vulnerable OTP versions.
Potential Impact
The primary impact of this vulnerability is unauthorized file manipulation through path traversal during zip extraction, which can lead to overwriting critical system or application files, insertion of malicious payloads, or disruption of service. This compromises system integrity and may facilitate privilege escalation or persistent malware installation if exploited in a multi-stage attack. Availability could be affected if critical files are overwritten or deleted. Confidentiality impact is limited but possible if sensitive files are overwritten or replaced with malicious versions. Since exploitation requires local access and user interaction, remote exploitation risk is low unless combined with other vulnerabilities or social engineering. Organizations relying on Erlang OTP for telecommunications, messaging platforms, or distributed systems could face operational disruptions or security breaches if this vulnerability is exploited.
Mitigation Recommendations
To mitigate this vulnerability, organizations should: 1) Upgrade Erlang OTP to a version beyond 28.0.1 or apply vendor patches once available. 2) Avoid extracting untrusted zip files using vulnerable OTP versions, especially without the memory option enabled. 3) Use the memory option in zip:unzip and zip:extract functions to prevent filesystem writes during extraction. 4) Implement strict input validation and sanitization on zip file contents before extraction. 5) Employ least privilege principles to limit user permissions on systems running Erlang OTP, reducing the impact of potential exploitation. 6) Monitor file system changes and audit logs for unusual file creation or modification patterns indicative of exploitation attempts. 7) Educate users about the risks of opening untrusted archives and enforce policies restricting such actions. These steps go beyond generic patching by emphasizing configuration options and operational controls to reduce attack surface.
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: 2/28/2026, 2:55:14 PM
Last updated: 3/21/2026, 12:35:27 PM
Views: 73
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.