Apr 3, 2026·6 min read·3 visits
A use-after-free flaw in Foxit's form calculation engine enables arbitrary code execution via malicious PDFs. The application fails to clear stale pointers when pages or form elements are deleted.
Foxit PDF Editor and PDF Reader contain a critical use-after-free vulnerability within the list box calculate array logic. This flaw allows an attacker to execute arbitrary code by manipulating the lifecycle of document form fields and pages via crafted AcroJS scripts.
Foxit PDF Editor and PDF Reader implement a feature known as the list box calculate array. This internal data structure manages the execution order of form field calculation scripts, specifically for handling Choice fields (list boxes). When a document author defines a calculation script via AcroJS, the application tracks field dependencies to update related fields dynamically upon value changes.
CVE-2026-3779 is a use-after-free (CWE-416) vulnerability residing in this dependency tracking mechanism. The application fails to properly synchronize the lifecycle of PDF form objects with the calculate array. As a result, the internal arrays can retain raw pointers to memory locations that no longer hold valid objects.
An attacker can construct a malicious PDF document that intentionally triggers this desynchronization. By executing specific sequence of AcroJS commands, the attacker forces the application to dereference a stale pointer. This memory corruption condition serves as a primitive for hijacking the application's control flow and achieving arbitrary code execution.
The vulnerability is fundamentally an object lifecycle mismanagement issue within the application's C++ codebase. The calculate array stores references to internal objects representing form fields and document pages to facilitate rapid execution of AcroJS callbacks. These references are implemented as raw memory pointers rather than safe handles or smart pointers.
When JavaScript execution dynamically alters the document structure using methods such as doc.deletePage() or doc.removeField(), the application's memory manager correctly deallocates the corresponding internal objects. However, the update routines responsible for purging these objects do not propagate the deallocation event to the calculate array logic. The tracking array is left containing stale, dangling pointers pointing to the freed heap chunks.
The vulnerability manifests when a subsequent action triggers a form calculation event. The calculation engine iterates over the tainted calculate array and attempts to invoke virtual functions or read properties from the deallocated object. Because the pointer no longer references a valid object structure, this results in an access violation or allows interaction with replacement data residing in the freed chunk.
While exact C++ patch differentials are proprietary, the vulnerability can be analyzed through the AcroJS execution flow required to trigger it. The attack relies on chaining object creation, destruction, and event triggering within a single script execution block. The calculate array must be populated before the target object is freed.
The following conceptual AcroJS snippet demonstrates the trigger sequence:
// 1. Reference the target list box field
var targetField = this.getField("ListBox1");
// 2. Destroy the underlying object by deleting its parent page
// The internal calculate array retains a pointer to the destroyed object
this.deletePage(0);
// 3. Trigger the calculation event
// This forces the engine to iterate over the calculate array
targetField.value = "trigger_calculation";When this.deletePage(0) is invoked, Foxit's internal implementation calls the destructor for the page and its child form elements. The memory chunk is returned to the heap allocator. When targetField.value is subsequently modified, the engine invokes the calculate callback. The C++ function responsible for processing the array retrieves the pointer and attempts a virtual method call (e.g., pObject->Calculate()), leading directly to the use-after-free condition.
Converting this use-after-free into arbitrary code execution requires precise manipulation of the application's heap layout. After the target object is freed via deletePage(), the attacker must allocate new data of the exact same size to reclaim the freed memory chunk. This technique, known as heap spraying or heap grooming, is typically achieved by allocating numerous AcroJS strings or ArrayBuffer objects.
The attacker populates these crafted objects with a fake virtual function table (vtable) and a payload such as return-oriented programming (ROP) chains. When the calculation event is triggered, the engine treats the attacker-controlled data as a legitimate C++ object. The application reads the fake vtable pointer and dispatches execution to an attacker-controlled address.
The exploit runs within the context of the Foxit PDF process. Due to modern mitigation techniques like ASLR and DEP, the attacker must also leverage a separate information leak vulnerability to bypass ASLR, or rely on non-randomized modules within the application's memory space. Once control flow is hijacked, the payload typically executes a final stage to deploy malware or establish persistent access.
Successful exploitation of CVE-2026-3779 results in arbitrary code execution within the context of the Foxit application process. Because PDF readers typically run with the privileges of the logged-in user, an attacker gains identical access permissions. This allows the attacker to read local files, modify system configurations, and pivot to other internal network resources.
The vulnerability holds a CVSS v3.1 base score of 7.8 (High). The attack vector is Local (AV:L), requiring the victim to open a maliciously crafted PDF file. However, because PDF documents are ubiquitous in business communications, this flaw presents a highly effective vector for spear-phishing campaigns. The attack complexity is Low (AC:L), as the exploitation sequence can be reliably embedded within the file structure.
Current threat intelligence indicates an EPSS score of 0.00019 (4.93rd percentile), reflecting that while a Proof-of-Concept is technically feasible, active exploitation in the wild is currently low. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog. Nevertheless, the reliability of client-side use-after-free bugs makes this a high-priority issue for enterprise environments.
The primary remediation for CVE-2026-3779 is to apply the vendor-supplied security updates. Foxit has addressed the use-after-free condition in Foxit PDF Editor versions newer than 2025.3, 14.0.2, and 13.2.2, as well as Foxit PDF Reader versions newer than 2025.3. The patches introduce proper reference counting and object lifecycle synchronization within the calculate array logic, ensuring pointers are invalidated upon object destruction.
In environments where immediate patching is not feasible, administrators can apply configuration workarounds to neutralize the attack vector. Disabling JavaScript execution within the application entirely prevents the AcroJS trigger mechanism from running. This can be configured globally via Group Policy or locally in Foxit Preferences by navigating to Preferences > JavaScript and unchecking 'Enable JavaScript Actions'.
Additionally, enabling 'Safe Reading Mode' provides a secondary layer of defense by restricting the execution of untrusted active content. Security operations centers should also deploy endpoint detection rules to monitor child processes spawning from FoxitPDFEditor.exe or FoxitPDFReader.exe, as this behavior is a strong indicator of successful client-side exploitation.
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H| Product | Affected Versions | Fixed Version |
|---|---|---|
Foxit PDF Editor Foxit | <= 2025.3 | 2025.3 Update |
Foxit PDF Editor Foxit | <= 14.0.2 | 14.0.2 Update |
Foxit PDF Editor Foxit | <= 13.2.2 | 13.2.2 Update |
Foxit PDF Reader Foxit | <= 2025.3 | 2025.3 Update |
| Attribute | Detail |
|---|---|
| Vulnerability Type | Use After Free (CWE-416) |
| CVSS Score | 7.8 (High) |
| Attack Vector | Local (User Interaction Required) |
| Exploit Status | Proof of Concept (PoC) |
| CISA KEV | Not Listed |
| EPSS Score | 0.00019 (4.93%) |
The application fails to clear references to internal objects after they are deleted, leading to a use-after-free condition during array calculation.