CVE-2022-28672 Overview
CVE-2022-28672 is a Use-After-Free vulnerability affecting Foxit PDF Reader and PDF Editor that enables remote attackers to execute arbitrary code on affected systems. The vulnerability exists within the handling of Doc objects in Foxit PDF Reader 11.2.1.53537 and related versions. The flaw stems from the lack of proper validation of an object's existence prior to performing operations on it, creating a dangerous memory corruption condition.
User interaction is required for exploitation—the target must visit a malicious webpage or open a specially crafted PDF file. Once exploited, an attacker can execute code in the context of the current process, potentially leading to full system compromise depending on the user's privilege level. This vulnerability was originally tracked as ZDI-CAN-16640 through the Zero Day Initiative.
Critical Impact
Remote code execution through malicious PDF documents allows attackers to gain control of affected systems with the privileges of the current user. Combined with the widespread use of PDF readers in enterprise environments, this vulnerability poses a significant risk to organizational security.
Affected Products
- Foxit PDF Reader (versions prior to security patch)
- Foxit PDF Editor (versions prior to security patch)
- Microsoft Windows (as the underlying platform)
Discovery Timeline
- 2022-07-18 - CVE-2022-28672 published to NVD
- 2024-11-21 - Last updated in NVD database
Technical Details for CVE-2022-28672
Vulnerability Analysis
This Use-After-Free (CWE-416) vulnerability occurs within Foxit PDF Reader's JavaScript engine when handling Doc objects. The core issue arises when the application fails to validate whether an object still exists in memory before attempting to perform operations on it.
In PDF documents, Doc objects represent the document itself and provide access to various document-level operations through JavaScript. When a Doc object is freed but a reference to it remains, subsequent operations using that stale reference attempt to access deallocated memory. This creates a Use-After-Free condition that can be exploited to achieve arbitrary code execution.
The exploitation requires user interaction—either visiting a malicious webpage containing an embedded PDF or opening a weaponized PDF file directly. Once the malicious document is processed, the attacker-controlled JavaScript triggers the Use-After-Free condition, potentially allowing execution of arbitrary code with the privileges of the current user.
Root Cause
The vulnerability stems from improper object lifecycle management in Foxit PDF Reader's Doc object handler. The application fails to properly track and validate object references after memory deallocation, allowing dangling pointers to persist. When these invalid references are subsequently dereferenced, the application accesses freed memory that may have been reallocated for other purposes or contain attacker-controlled data.
This is a classic Use-After-Free pattern where the temporal relationship between object destruction and reference usage is not properly enforced, leading to memory safety violations.
Attack Vector
The attack vector for CVE-2022-28672 requires local file access or web-based delivery:
Malicious PDF File Delivery: An attacker crafts a specially designed PDF document containing JavaScript that manipulates Doc objects to trigger the Use-After-Free condition. The file can be delivered via email attachment, file sharing, or direct download.
Web-Based Attack: A malicious webpage can embed or reference a weaponized PDF that is automatically processed by Foxit PDF Reader when the victim visits the page with the browser plugin enabled.
Memory Manipulation: The attacker's JavaScript code creates specific object allocation and deallocation patterns to set up the Use-After-Free condition, then triggers an operation on the freed Doc object to achieve code execution.
The vulnerability mechanism involves JavaScript within the PDF document manipulating Doc objects in a way that leaves dangling references after object deallocation. Technical details of the exploitation technique are available through the Zero Day Initiative Advisory ZDI-22-763.
Detection Methods for CVE-2022-28672
Indicators of Compromise
- Suspicious PDF files containing obfuscated or heavily nested JavaScript code targeting Doc objects
- Unexpected child processes spawned by FoxitPDFReader.exe or FoxitPhantomPDF.exe
- Memory access violations or crash dumps from Foxit PDF Reader indicating heap corruption
- Network connections initiated by Foxit PDF processes following PDF document opening
Detection Strategies
- Deploy endpoint detection rules to monitor for anomalous behavior from Foxit PDF Reader processes, including unexpected process spawning or memory access patterns
- Implement file inspection capabilities to identify PDF documents containing suspicious JavaScript that manipulates Doc objects
- Configure application whitelisting to prevent unauthorized executables from running in the context of PDF reader processes
- Monitor for Foxit PDF Reader crashes that may indicate exploitation attempts, particularly those involving heap corruption signatures
Monitoring Recommendations
- Enable enhanced logging for PDF reader applications to capture JavaScript execution events and document processing activity
- Implement network monitoring to detect command-and-control communications following PDF document access
- Deploy memory protection technologies that can detect Use-After-Free exploitation attempts at runtime
- Establish baseline process behavior for Foxit PDF Reader to identify deviations indicative of exploitation
How to Mitigate CVE-2022-28672
Immediate Actions Required
- Update Foxit PDF Reader and Foxit PDF Editor to the latest patched versions immediately
- Disable JavaScript execution in Foxit PDF Reader through Preferences > JavaScript > Enable JavaScript Actions (uncheck)
- Implement email gateway filtering to scan and quarantine suspicious PDF attachments
- Consider temporarily switching to alternative PDF readers until patches are applied in environments with high-risk exposure
Patch Information
Foxit has released security updates to address this vulnerability. Administrators should consult the Foxit Security Bulletin for the latest patched versions and apply updates across all affected systems.
Organizations should prioritize patching workstations where users regularly open PDF documents from untrusted sources, including email attachments and web downloads. The patched versions include proper object validation checks that prevent the Use-After-Free condition from being triggered.
Workarounds
- Disable JavaScript in Foxit PDF Reader via Edit > Preferences > JavaScript > uncheck "Enable JavaScript Actions"
- Configure Foxit PDF Reader to run in Protected Mode/Safe Reading Mode to limit the impact of potential exploitation
- Implement application sandboxing or containerization for PDF reader processes to contain any successful exploitation
- Block PDF attachments from untrusted sources at the email gateway level until patches can be applied
# Disable JavaScript in Foxit PDF Reader via registry (Windows)
reg add "HKEY_CURRENT_USER\Software\Foxit Software\Foxit PDF Reader\Preferences" /v "bEnableJS" /t REG_DWORD /d 0 /f
# For enterprise deployment, apply via Group Policy or management tools
# Verify the setting is applied across all managed endpoints
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


