CVE-2021-42198
Medium · 5.5CVSS
5.5
EPSS
0.7%
Published
Jun 2, 2022
CISA due date
—
Cloudanix analysis
A bug in an older tool that reads Flash files can make the program crash when it tries to open certain bad files, stopping whatever task was using it.
- 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 swf_GetBits() within rfxswf.c triggers a crash when parsing malformed SWF input, resulting in denial of service.
Why it matters to the business
Processing of untrusted SWF files can halt automated workflows or services that rely on swftools, causing operational downtime until the affected process is restarted.
How an attack unfolds
An attacker crafts a malformed SWF file that triggers the NULL dereference in swf_GetBits(). The victim opens or processes the file locally with swftools, causing the application to crash and become unavailable.
How to fix it
No fixed versions are published; discontinue use of swftools on untrusted input, replace with alternative SWF parsers, or apply custom patches that validate input before calling swf_GetBits().
How to confirm the fix worked
Attempt to process known-malformed test SWF files with the updated or replaced parser and confirm the process no longer crashes; monitor for absence of segmentation faults in logs.
Typical attack path
- Attacker generates a specially crafted SWF file containing data that reaches swf_GetBits() with a NULL pointer.
- Attacker delivers the file via email, web download, or shared storage.
- Victim or automated system invokes a swftools utility on the file.
- swf_GetBits() dereferences NULL, crashing the process and denying service.
How to detect it
Review process crash logs and core dumps for segmentation faults originating from rfxswf.c or swf_GetBits(); correlate with recent SWF file access in user or service histories.
What your security team should do
- Immediately restrict swftools execution to trusted files only.
- Replace swftools with maintained libraries or tools that handle SWF parsing safely.
- Add SWF file handling to the list of high-risk file types requiring sandboxing or blocking.
The record
An issue was discovered in swftools through 20201222. A NULL pointer dereference exists in the function swf_GetBits() located in rfxswf.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