Canva Affinity EMF File EMR_HEADER nDescription Out-Of-Bounds Read Vulnerability
The EMF file loader in Canva Affinity did not validate the nDescription field of the EMR_HEADER record, so a crafted EMF file could make the program copy more bytes than the record actually contains. An attacker could use this to read memory beyond the buffer, potentially disclosing sensitive information from the process.
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 used the attacker-controlled nDescription value to size a memcpy without checking that offDescription plus nDescription stayed within the EMR_HEADER record size.
Impact
Exploiting this vulnerability allows for the reading of arbitrary memory within the process, potentially disclosing sensitive information; the CVSS vector indicates local access and user interaction are required.
What the attacker needed
Local access to the machine; victim opens a crafted EMF file
The fix
The vendor released a patch on 2026-03-17, and the loader should validate that offDescription plus nDescription does not exceed the record size before copying.
How it was found
- Open a crafted EMF file in Canva Affinity so the EMF loader processes the EMR_HEADER record.
- The loader reads offDescription and nDescription from the header.
- It computes the description size from nDescription and allocates a destination buffer.
- It calls memcpy using nDescription to copy the description from the header into the new buffer.
- Because nDescription exceeds the record size, the copy reads past the end of the header and crashes with 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.
An EMF file is a picture format that starts with a header describing the rest of the file. One field in that header says how long a text description is, and the program trusted that number without checking it against the real size of the header. When the number was too big, the program copied data from past the end of the header, which can pull in unrelated memory contents.
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.