The vulnerability exists due to a boundary condition within the handling of Doc objects. A remote attacker can create a specially crafted file, trick the victim into opening it, trigger an out-of-bounds read error and read contents of memory on the system, leading to arbitrary code execution.