Canva Affinity EMF File EMR_HEADER offDescription Out-Of-Bounds Read Vulnerability
The EMF loader in Canva Affinity does not validate the offDescription field of the EMR_HEADER record, so a crafted EMF file can make the description pointer land outside the allocated record. An attacker could then trigger an out-of-bounds read that may disclose sensitive process memory.
An out-of-bounds read vulnerability exists in the EMF functionality of Canva Affinity. By using a specially crafted EMF file, an attacker could exploit this vulnerability to perform an out-of-bounds read, potentially leading to the disclosure of sensitive information.
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
The loader uses offDescription as an offset without checking that offDescription plus nDescription stays within recordSize, so the description pointer can point past the allocated header.
Impact
Exploiting this vulnerability allows for the reading of arbitrary memory within the process, potentially disclosing sensitive information.
What the attacker needed
Victim opens a crafted EMF file; Affinity 3.0.1.3808 installed
The fix
The loader should validate that offDescription plus nDescription does not exceed recordSize before using the description pointer; the vendor released a patch on 2026-03-17.
How it was found
- Craft an EMF file whose EMR_HEADER has an offDescription larger than the record size.
- Open the file in the vulnerable Affinity application so the EMF loader processes the header.
- The loader adds offDescription to the header pointer, producing an address outside the allocated record.
- The program later copies from that address, causing an out-of-bounds read and an access violation.
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.
EMF is a file format for storing pictures, and it starts with a header that says where a text description sits inside the file. The program trusted that location without checking it stayed inside the header, so it read memory from beyond the file's data. A malicious file could therefore make the program copy unrelated memory, which might contain private information.
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.