CVE-2021-39596
Medium · 5.5CVSS
5.5
EPSS
0.7%
Published
Sep 20, 2021
CISA due date
—
Cloudanix analysis
A bug in an older media-conversion program can make the program crash when it tries to read certain files, stopping any automated tasks that depend on it.
- Exploitation
- Requires User Interaction
- Attacker needs
- Local User
- 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 code_parse() within code.c triggers an immediate crash when processing a specially crafted input file.
Why it matters to the business
Workloads that convert or inspect SWF files become unavailable until the affected process is restarted, interrupting automated media pipelines and batch jobs.
How an attack unfolds
An attacker supplies a malformed SWF file to any swftools utility that invokes code_parse(); the missing null check causes the tool to dereference an invalid pointer and terminate.
How to fix it
Upgrade to a patched build if one becomes available; otherwise replace swftools with a maintained alternative and restrict the original binaries to trusted, non-network inputs only.
How to confirm the fix worked
Run the affected utilities against a known triggering test case and confirm the process exits with a segmentation fault or equivalent signal rather than a clean error.
Typical attack path
- Craft a minimal SWF that reaches code_parse() with a null code object
- Deliver the file to a target system running an affected swftools binary
- Trigger parsing via command-line invocation or scripted workflow
- Observe process crash and service denial
How to detect it
Search application and system logs for abrupt termination of swftools processes, especially entries containing code_parse or code.c references around the time of file-processing jobs.
- segmentation fault.*code_parse
- code.c:.*NULL
- swftools.*crashed
What your security team should do
- Remove or sandbox swftools on any system that may receive untrusted files
- Add crash-monitoring alerts for swftools processes
- Inventory all scripts and CI jobs that invoke these utilities and schedule migration
The record
An issue was discovered in swftools through 20200710. A NULL pointer dereference exists in the function code_parse() located in code.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