CVE-2021-39591
Medium · 5.5CVSS
5.5
EPSS
0.7%
Published
Sep 20, 2021
CISA due date
—
Cloudanix analysis
A bug in an older Flash-file handling program can make the program suddenly stop working when it opens certain bad files, interrupting any tasks that rely on 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_GetShapeBoundingBox() within swfshape.c causes the application to crash when parsing a malformed SWF file.
Why it matters to the business
Untrusted SWF files can force the swftools utilities to terminate unexpectedly, interrupting batch processing, conversion workflows, and any automated pipelines that depend on the tools.
How an attack unfolds
An attacker supplies a crafted SWF file containing a shape record that leaves a required pointer NULL; when swftools invokes swf_GetShapeBoundingBox during parsing, the dereference triggers an immediate crash.
How to fix it
No official fixed versions are published; discontinue use of swftools on untrusted input, replace the tool with a maintained alternative, or apply a local patch that adds a NULL check before dereferencing the pointer in swfshape.c.
How to confirm the fix worked
Confirm exposure by running the affected swftools binary against a minimal SWF that exercises swf_GetShapeBoundingBox; success is indicated by an immediate segmentation fault or abort. After mitigation, re-test with the same file to verify the crash no longer occurs.
Typical attack path
- Generate or obtain a malicious SWF file that triggers the NULL pointer path
- Deliver the file to a victim system or automated processor that uses swftools
- Victim or process opens the file, causing swf_GetShapeBoundingBox to be called
- Application crashes, producing a denial-of-service condition
How to detect it
Review system and application logs for segmentation faults or abrupt terminations of swftools binaries immediately after SWF file access; correlate with file-access timestamps to identify suspicious inputs.
What your security team should do
- Remove or sandbox swftools from any environment that processes external files
- Add file-type and source validation to block SWF ingestion where possible
- Monitor process crash logs and set resource limits to contain impact
- Replace swftools with a supported library or utility in all pipelines
The record
An issue was discovered in swftools through 20200710. A NULL pointer dereference exists in the function swf_GetShapeBoundingBox() located in swfshape.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