Skip to content
Memory corruption Advisory Advanced CVE-2025-66633

Canva Affinity EMF File EMR_STRETCHBLT cbBitsSrc Out-Of-Bounds Read Vulnerability

The EMF loader in Canva Affinity computes the size of the remaining bitmap data from attacker-controlled offset and size fields without checking the result against the record size. A crafted EMF file can therefore make the application copy more bytes than the record holds, causing an out-of-bounds read that may disclose sensitive memory.

KPC Follow

Originally disclosed on Cisco Talos

Medium 6.1 View original

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.

KPC, on Cisco Talos

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 calculates the remaining bitmap size as offBitsSrc + cbBitsSrc - offBmiSrc - headerSize and passes it to a copy routine without verifying it fits within the record.

Impact

An attacker could cause an out-of-bounds read that may disclose sensitive information, and the crash shows the copy running past the buffer; exploitation requires the victim to open a crafted file.

What the attacker needed

Victim opens a crafted EMF file; local access to the application

How it was found

  1. Open a crafted EMF file in Canva Affinity.
  2. The loader reads the EMR_STRETCHBLT record and its offset and size fields.
  3. It computes the remaining bitmap size from those fields without a bounds check.
  4. It calls the bitmap creation routine with that oversized length.
  5. A memcpy copies past the end of the record, triggering 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.

An EMF file is a picture format that stores drawing instructions, and each instruction is a record with fields saying where its data sits and how big it is. The program worked out how much bitmap data to copy using those numbers but never checked that the answer stayed inside the record, so it read past the end of the buffer. Reading past a buffer can pull unrelated memory into the image or crash 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.

More by KPC

View all

102 more disclosed reports, best first.

More from Cisco Talos

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.