CVE-2021-42200
Medium · 5.5CVSS
5.5
EPSS
0.7%
Published
Jun 2, 2022
CISA due date
—
Cloudanix analysis
A bug in a file-processing tool can make it crash when it receives certain bad files, briefly stopping whatever work depends on that tool.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Application
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
NULL pointer dereference in main() within swfdump.c causes the process to crash when handling specially crafted input, resulting in denial of service.
Why it matters to the business
Unexpected crashes interrupt processing workflows that rely on the affected library or tool, leading to operational delays and potential loss of availability for dependent services.
How an attack unfolds
An attacker supplies a malformed input file to the swfdump utility; the code path reaches the vulnerable main function without proper null checks, dereferencing a null pointer and terminating the process.
How to fix it
Upgrade libp2p/js-libp2p to the fixed commit cfc26ee21516a411971af5e4aec446c7c3eab6c0; rebuild and redeploy any packages that embed the vulnerable swftools code.
How to confirm the fix worked
Confirm the installed version or commit hash matches the fixed revision; re-run the crashing input against the updated binary to verify it no longer terminates unexpectedly.
Typical attack path
- Identify an application or script that invokes the vulnerable swfdump functionality
- Craft or obtain a file that triggers the null dereference
- Deliver the file to the target process or command
- Observe process termination and service disruption
How to detect it
Review system and application logs for abrupt terminations of swfdump or processes linked to the affected library; correlate with file-processing events around the time of the crash.
What your security team should do
- Apply the referenced commit immediately given the public exploit availability
- Scan build pipelines and dependency manifests for the vulnerable swftools code
- Add crash-monitoring alerts for swfdump processes in production environments
The record
An issue was discovered in swftools through 20201222. A NULL pointer dereference exists in the function main() located in swfdump.c. It allows an attacker to cause Denial of Service.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Ubuntu:16.04:LTS | swftools | 0 | No fix |
| Ubuntu:18.04:LTS | swftools | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | swftools | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | swftools | 0 | No fix |
Related vulnerabilities
- CVE-2024-28458 Null Pointer Dereference vulnerability in swfdump in swftools 0.9.2 allows attackers to… Also affects swftools
- CVE-2024-26334 swftools v0.9.2 was discovered to contain a segmentation violation via the function… Also affects swftools
- CVE-2024-26337 swftools v0.9.2 was discovered to contain a segmentation violation via the function… Also affects swftools
- CVE-2024-26335 swftools v0.9.2 was discovered to contain a segmentation violation via the function… Also affects swftools
- CVE-2024-26339 swftools v0.9.2 was discovered to contain a strcpy parameter overlap via… Also affects swftools
- CVE-2024-26333 swftools v0.9.2 was discovered to contain a segmentation violation via the function… Also affects swftools
- CVE-2024-25165 A global-buffer-overflow vulnerability was found in SWFTools v0.9.2, in the function… Also affects swftools
- CVE-2024-22956 swftools 0.9.2 was discovered to contain a heap-use-after-free vulnerability via the… Also affects swftools