CVE-2022-35099
Medium · 5.5CVSS
5.5
EPSS
0.4%
Published
Sep 23, 2022
CISA due date
—
Cloudanix analysis
A flaw in a popular file-conversion tool can make the program crash when it opens certain specially made files, interrupting any automated or manual work that relies 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
Stack-based buffer overflow in ImageStream::getPixel allows an attacker-supplied image stream to corrupt the call stack, resulting in an immediate process crash (denial of service).
Why it matters to the business
Automated or user-initiated processing of untrusted SWF or PDF-derived files can cause the swftools utilities to terminate unexpectedly, interrupting workflows that depend on reliable file conversion or inspection.
How an attack unfolds
An attacker crafts a malicious image stream inside an SWF or PDF file that triggers the vulnerable getPixel path; when the victim opens or converts the file with any swftools binary, the overflow occurs on the stack and crashes the process.
How to fix it
Upgrade to a patched build of swftools that contains the fix for the stack overflow in Stream.cc; if no official release is available, apply the upstream commit that bounds the pixel buffer access or discontinue use of the affected utilities on untrusted input.
How to confirm the fix worked
Re-run the affected swftools binaries against a known-triggering test file and confirm the process no longer crashes; monitor build logs or source history for the corrected getPixel implementation.
Typical attack path
- Attacker prepares a specially malformed image stream within an SWF or PDF container.
- Victim receives the file via email, download, or shared storage.
- Victim invokes a swftools utility (pdf2swf, swfextract, etc.) on the file.
- ImageStream::getPixel reads attacker-controlled data, overflows the stack, and aborts the process.
How to detect it
Review process-crash logs, core dumps, or security event logs for sudden termination of swftools binaries when handling SWF or PDF files; correlate with file-creation or download events immediately preceding the crash.
What your security team should do
- Block or sandbox all swftools usage on untrusted files until a fixed build is deployed.
- Add the vulnerable utilities to application allow-lists only after verifying the patch.
- Scan historical build and CI logs for any retained copies of the vulnerable commit.
The record
SWFTools commit 772e55a2 was discovered to contain a stack overflow via ImageStream::getPixel(unsigned char*) at /xpdf/Stream.cc.
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