Canva Affinity EMF File EMR_POLYPOLYLINE Count Out-Of-Bounds Read Vulnerability
The EMF loader in Canva Affinity trusts the Count field of an EMR_POLYPOLYLINE record without checking it against the record size, so a crafted EMF file makes the parser read past the end of its buffer. An attacker could use this to read arbitrary process memory and potentially disclose sensitive information.
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
Likely the parser computes the aPoints offset from NumberOfPolylines and Count but never verifies that the resulting size fits within recordSize, and it also reads PointS-sized entries while the format defines PointL entries.
Impact
An attacker could read arbitrary memory within the process, potentially disclosing sensitive information; the CVSS vector rates confidentiality as high and requires user interaction to open the file.
What the attacker needed
Victim opens a crafted EMF file; local access to the application
The fix
The vendor released a patch on 2026-03-17 according to the timeline.
How it was found
- Open a crafted EMF file in Canva Affinity with pageheap enabled.
- The loader reads the EMR_POLYPOLYLINE record and takes NumberOfPolylines to compute the aPoints offset.
- It adds that offset to the record base to locate aPoints.
- It checks that Count is non-zero and starts a loop reading point entries Count times.
- Because Count is excessively large, the loop reads past the buffer 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 list of drawing instructions, and each instruction says how big it is. The program here trusts a number inside one instruction that says how many points follow, without checking that the file actually contains that many. A malicious file can therefore make the program read memory beyond the file's data, which may leak information from the program.
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.