Foxit PDF Reader XFA xdpContent information leak vulnerability
Foxit PDF Reader mishandles the length of a wide-character string in the xdpContent attribute of an XFA submit element, treating a length-prefixed string as if it were null-terminated. A crafted PDF can cause an out-of-bounds read that discloses adjacent heap memory, which could help bypass ASLR when combined with another flaw.
Originally disclosed on Cisco Talos
An exploitable out-of-bounds read vulnerability exists in the handling of certain XFA element attributes of Foxit Software’s PDF Reader version 9.1.0.5096. A specially crafted PDF document can trigger an out-of-bounds read, which can disclose sensitive memory content and aid in exploitation when coupled with another…
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the code computes the length of a wide-character string by scanning for a null terminator even though the string is length-prefixed and not null-terminated, so the scan can run past the allocation.
Impact
The out-of-bounds read can disclose sensitive heap memory, and with careful heap layout control it could leak heap and function pointers to bypass ASLR or other mitigations, though the text notes this requires coupling with another vulnerability.
What the attacker needed
Victim opens a crafted PDF; or visits a malicious site with plugin enabled; careful heap layout control for leaks
How it was found
- Create a PDF containing an XFA template with a submit element whose xdpContent attribute holds a long string.
- Open the crafted PDF in the affected Foxit PDF Reader, or visit a malicious site if the browser plugin is enabled.
- The reader scans past the string looking for a null terminator and reads into the adjacent heap chunk.
- The oversized length is used for allocation and copying, disclosing adjacent memory contents.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A PDF can contain interactive forms, and one form field stores text with its length written in front of it instead of an end marker. The reader ignores that length and keeps reading until it finds an end marker, so it can run past the buffer and copy nearby memory into a place the attacker can see. That leaked memory may contain addresses that help defeat protections against exploitation.
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.