CVE-2025-64118: CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition') in isaacs node-tar
node-tar is a Tar for Node.js. In 7.5.1, using .t (aka .list) with { sync: true } to read tar entry contents returns uninitialized memory contents if tar file was changed on disk to a smaller size while being read. This vulnerability is fixed in 7.5.2.
AI Analysis
Technical Summary
CVE-2025-64118 is a concurrency-related vulnerability classified under CWE-362 (Race Condition) and CWE-367 (Time-of-check Time-of-use (TOCTOU) Race Condition) affecting the node-tar package version 7.5.1, a widely used Node.js library for handling tar archives. The issue arises when the .t (or .list) method is invoked with the { sync: true } option to synchronously read tar entry contents. If the tar file on disk is truncated to a smaller size during the read operation, the method may return uninitialized memory contents instead of valid data. This occurs due to improper synchronization and lack of atomicity in file size checks and reads, allowing a race condition between file modification and reading. The vulnerability can lead to leakage of potentially sensitive memory data, violating confidentiality. Exploitation requires local or low-privilege access to the system where node-tar is used, partial user interaction, and the ability to modify tar files during read operations. The CVSS 4.0 score is 6.1 (medium severity), reflecting the complexity and limited attack vector. The flaw was addressed in node-tar version 7.5.2 by improving synchronization and ensuring safe reads. No public exploits are known at this time. This vulnerability is particularly relevant for applications that process tar files synchronously and may be exposed to concurrent file modifications, such as CI/CD pipelines, build systems, or file extraction services using node-tar 7.5.1.
Potential Impact
For European organizations, this vulnerability poses a confidentiality risk as uninitialized memory contents could be exposed, potentially leaking sensitive information such as credentials, tokens, or other in-memory data. Organizations relying on node-tar 7.5.1 in environments where tar files are accessed and modified concurrently—such as automated build servers, container image extraction, or file archival services—may inadvertently expose sensitive data. While the vulnerability does not directly affect system integrity or availability, the data leakage risk can lead to further compromise if sensitive information is obtained by attackers. The requirement for local or low-privilege access and partial user interaction limits remote exploitation but insider threats or compromised accounts could exploit this flaw. European entities in sectors with stringent data protection regulations (e.g., finance, healthcare, government) must be particularly vigilant to avoid data breaches. The medium severity rating indicates a moderate but non-trivial risk that should be addressed promptly to maintain compliance and security posture.
Mitigation Recommendations
1. Upgrade node-tar to version 7.5.2 or later immediately to incorporate the fix addressing the race condition. 2. Avoid using the .t or .list method with { sync: true } on tar files that may be concurrently modified or truncated during read operations. Prefer asynchronous methods with proper file locking or atomic operations where possible. 3. Implement file integrity monitoring and access controls to prevent unauthorized or concurrent modifications of tar files during processing. 4. Restrict local access and user permissions to minimize the risk of malicious or accidental concurrent file changes. 5. In CI/CD or automated environments, ensure that tar files are stable and immutable during extraction or listing phases. 6. Conduct code reviews and testing to detect similar race conditions in other file handling components. 7. Monitor for any emerging exploits or advisories related to this vulnerability to respond rapidly if exploitation attempts arise.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Italy, Spain, Poland
CVE-2025-64118: CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition') in isaacs node-tar
Description
node-tar is a Tar for Node.js. In 7.5.1, using .t (aka .list) with { sync: true } to read tar entry contents returns uninitialized memory contents if tar file was changed on disk to a smaller size while being read. This vulnerability is fixed in 7.5.2.
AI-Powered Analysis
Technical Analysis
CVE-2025-64118 is a concurrency-related vulnerability classified under CWE-362 (Race Condition) and CWE-367 (Time-of-check Time-of-use (TOCTOU) Race Condition) affecting the node-tar package version 7.5.1, a widely used Node.js library for handling tar archives. The issue arises when the .t (or .list) method is invoked with the { sync: true } option to synchronously read tar entry contents. If the tar file on disk is truncated to a smaller size during the read operation, the method may return uninitialized memory contents instead of valid data. This occurs due to improper synchronization and lack of atomicity in file size checks and reads, allowing a race condition between file modification and reading. The vulnerability can lead to leakage of potentially sensitive memory data, violating confidentiality. Exploitation requires local or low-privilege access to the system where node-tar is used, partial user interaction, and the ability to modify tar files during read operations. The CVSS 4.0 score is 6.1 (medium severity), reflecting the complexity and limited attack vector. The flaw was addressed in node-tar version 7.5.2 by improving synchronization and ensuring safe reads. No public exploits are known at this time. This vulnerability is particularly relevant for applications that process tar files synchronously and may be exposed to concurrent file modifications, such as CI/CD pipelines, build systems, or file extraction services using node-tar 7.5.1.
Potential Impact
For European organizations, this vulnerability poses a confidentiality risk as uninitialized memory contents could be exposed, potentially leaking sensitive information such as credentials, tokens, or other in-memory data. Organizations relying on node-tar 7.5.1 in environments where tar files are accessed and modified concurrently—such as automated build servers, container image extraction, or file archival services—may inadvertently expose sensitive data. While the vulnerability does not directly affect system integrity or availability, the data leakage risk can lead to further compromise if sensitive information is obtained by attackers. The requirement for local or low-privilege access and partial user interaction limits remote exploitation but insider threats or compromised accounts could exploit this flaw. European entities in sectors with stringent data protection regulations (e.g., finance, healthcare, government) must be particularly vigilant to avoid data breaches. The medium severity rating indicates a moderate but non-trivial risk that should be addressed promptly to maintain compliance and security posture.
Mitigation Recommendations
1. Upgrade node-tar to version 7.5.2 or later immediately to incorporate the fix addressing the race condition. 2. Avoid using the .t or .list method with { sync: true } on tar files that may be concurrently modified or truncated during read operations. Prefer asynchronous methods with proper file locking or atomic operations where possible. 3. Implement file integrity monitoring and access controls to prevent unauthorized or concurrent modifications of tar files during processing. 4. Restrict local access and user permissions to minimize the risk of malicious or accidental concurrent file changes. 5. In CI/CD or automated environments, ensure that tar files are stable and immutable during extraction or listing phases. 6. Conduct code reviews and testing to detect similar race conditions in other file handling components. 7. Monitor for any emerging exploits or advisories related to this vulnerability to respond rapidly if exploitation attempts arise.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2025-10-27T15:26:14.128Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6903a6a4aebfcd54748ac65e
Added to database: 10/30/2025, 5:55:48 PM
Last enriched: 10/30/2025, 6:12:22 PM
Last updated: 11/1/2025, 3:57:11 PM
Views: 27
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.
Related Threats
CVE-2025-36367: CWE-862 Missing Authorization
HighCVE-2025-6990: CWE-94 Improper Control of Generation of Code ('Code Injection') in hogash KALLYAS - Creative eCommerce Multi-Purpose WordPress Theme
HighCVE-2025-6988: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in hogash KALLYAS - Creative eCommerce Multi-Purpose WordPress Theme
MediumCVE-2025-6574: CWE-639 Authorization Bypass Through User-Controlled Key in aonetheme Service Finder Bookings
HighCVE-2025-12171: CWE-434 Unrestricted Upload of File with Dangerous Type in anthonyeden RESTful Content Syndication
HighActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.