CVE-2026-32630: CWE-409: Improper Handling of Highly Compressed Data (Data Amplification) in sindresorhus file-type
file-type detects the file type of a file, stream, or data. From 20.0.0 to 21.3.1, a crafted ZIP file can trigger excessive memory growth during type detection in file-type when using fileTypeFromBuffer(), fileTypeFromBlob(), or fileTypeFromFile(). The ZIP inflate output limit is enforced for stream-based detection, but not for known-size inputs. As a result, a small compressed ZIP can cause file-type to inflate and process a much larger payload while probing ZIP-based formats such as OOXML. This vulnerability is fixed in 21.3.2.
AI Analysis
Technical Summary
The vulnerability CVE-2026-32630 affects the sindresorhus file-type library, which is widely used to detect file types from buffers, blobs, or files. Between versions 20.0.0 and 21.3.1, the library improperly handles highly compressed ZIP files during type detection. Specifically, when processing ZIP-based formats such as OOXML, the library inflates compressed data to determine the file type. While stream-based detection enforces an inflate output limit to prevent excessive memory usage, this limit is not applied when the input size is known upfront. Consequently, a crafted ZIP file with a small compressed size can decompress into a significantly larger payload, causing excessive memory growth. This behavior can lead to denial of service by exhausting system memory resources. The vulnerability is classified under CWE-409 (Improper Handling of Highly Compressed Data leading to Data Amplification). It can be exploited remotely without requiring authentication or user interaction by submitting a malicious ZIP file to an application using the vulnerable library functions fileTypeFromBuffer(), fileTypeFromBlob(), or fileTypeFromFile(). The issue was publicly disclosed on March 13, 2026, and fixed in version 21.3.2 of the file-type library. The CVSS v3.1 base score is 5.3 (medium severity), reflecting the lack of impact on confidentiality or integrity but a clear availability impact due to potential denial of service.
Potential Impact
Organizations using the sindresorhus file-type library versions 20.0.0 to 21.3.1 in their applications or services are at risk of denial of service attacks. An attacker can submit a crafted ZIP file that triggers excessive memory consumption during file type detection, potentially causing application crashes or system instability. This can disrupt services that rely on file-type detection for processing uploads, file validation, or content inspection. The impact is primarily on availability, with no direct compromise of confidentiality or integrity. However, denial of service can lead to operational downtime, degraded user experience, and increased resource costs. Systems with limited memory or those processing untrusted file uploads are particularly vulnerable. Although no known exploits are reported in the wild, the ease of triggering this condition without authentication or user interaction increases the risk of opportunistic attacks. This vulnerability can affect web applications, cloud services, and any software components that incorporate the vulnerable file-type library for file format detection.
Mitigation Recommendations
To mitigate this vulnerability, organizations should upgrade the sindresorhus file-type library to version 21.3.2 or later, where the issue is fixed. If immediate upgrade is not feasible, implement input validation and size checks on ZIP files before processing them with file-type detection functions. Limit the size of files accepted for type detection and reject suspiciously small compressed files that could decompress into large payloads. Employ resource usage monitoring and impose memory usage limits on processes handling file uploads to detect and prevent excessive consumption. Consider sandboxing or isolating file-type detection operations to contain potential denial of service effects. Additionally, review and update dependency management practices to ensure timely application of security patches in third-party libraries. Finally, monitor application logs for unusual memory usage patterns or crashes related to file processing.
Affected Countries
United States, Germany, United Kingdom, France, Japan, South Korea, India, Canada, Australia, Netherlands
CVE-2026-32630: CWE-409: Improper Handling of Highly Compressed Data (Data Amplification) in sindresorhus file-type
Description
file-type detects the file type of a file, stream, or data. From 20.0.0 to 21.3.1, a crafted ZIP file can trigger excessive memory growth during type detection in file-type when using fileTypeFromBuffer(), fileTypeFromBlob(), or fileTypeFromFile(). The ZIP inflate output limit is enforced for stream-based detection, but not for known-size inputs. As a result, a small compressed ZIP can cause file-type to inflate and process a much larger payload while probing ZIP-based formats such as OOXML. This vulnerability is fixed in 21.3.2.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability CVE-2026-32630 affects the sindresorhus file-type library, which is widely used to detect file types from buffers, blobs, or files. Between versions 20.0.0 and 21.3.1, the library improperly handles highly compressed ZIP files during type detection. Specifically, when processing ZIP-based formats such as OOXML, the library inflates compressed data to determine the file type. While stream-based detection enforces an inflate output limit to prevent excessive memory usage, this limit is not applied when the input size is known upfront. Consequently, a crafted ZIP file with a small compressed size can decompress into a significantly larger payload, causing excessive memory growth. This behavior can lead to denial of service by exhausting system memory resources. The vulnerability is classified under CWE-409 (Improper Handling of Highly Compressed Data leading to Data Amplification). It can be exploited remotely without requiring authentication or user interaction by submitting a malicious ZIP file to an application using the vulnerable library functions fileTypeFromBuffer(), fileTypeFromBlob(), or fileTypeFromFile(). The issue was publicly disclosed on March 13, 2026, and fixed in version 21.3.2 of the file-type library. The CVSS v3.1 base score is 5.3 (medium severity), reflecting the lack of impact on confidentiality or integrity but a clear availability impact due to potential denial of service.
Potential Impact
Organizations using the sindresorhus file-type library versions 20.0.0 to 21.3.1 in their applications or services are at risk of denial of service attacks. An attacker can submit a crafted ZIP file that triggers excessive memory consumption during file type detection, potentially causing application crashes or system instability. This can disrupt services that rely on file-type detection for processing uploads, file validation, or content inspection. The impact is primarily on availability, with no direct compromise of confidentiality or integrity. However, denial of service can lead to operational downtime, degraded user experience, and increased resource costs. Systems with limited memory or those processing untrusted file uploads are particularly vulnerable. Although no known exploits are reported in the wild, the ease of triggering this condition without authentication or user interaction increases the risk of opportunistic attacks. This vulnerability can affect web applications, cloud services, and any software components that incorporate the vulnerable file-type library for file format detection.
Mitigation Recommendations
To mitigate this vulnerability, organizations should upgrade the sindresorhus file-type library to version 21.3.2 or later, where the issue is fixed. If immediate upgrade is not feasible, implement input validation and size checks on ZIP files before processing them with file-type detection functions. Limit the size of files accepted for type detection and reject suspiciously small compressed files that could decompress into large payloads. Employ resource usage monitoring and impose memory usage limits on processes handling file uploads to detect and prevent excessive consumption. Consider sandboxing or isolating file-type detection operations to contain potential denial of service effects. Additionally, review and update dependency management practices to ensure timely application of security patches in third-party libraries. Finally, monitor application logs for unusual memory usage patterns or crashes related to file processing.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-03-12T15:29:36.559Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 69b47e482f860ef943b3ab73
Added to database: 3/13/2026, 9:14:48 PM
Last enriched: 3/20/2026, 11:25:10 PM
Last updated: 4/28/2026, 12:57:46 AM
Views: 173
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.