Microsoft WindowsCodecs.dll SniffAndConvertToWideString information leak vulnerability
A malformed JPEG file with a GPSProcessingMethod tag lacking null termination causes WindowsCodecs.dll to create a non-null-terminated wide string, leading to an out-of-bounds read during a copy operation. An attacker could leak heap memory, potentially bypassing mitigations when exploiting another vulnerability.
Originally disclosed on Cisco Talos
An exploitable memory leak vulnerability exists in the SniffAndConvertToWideString function of WindowsCodecs.dll 10.0.17134.1. A specially crafted JPEG file can cause the library to return uninitialized memory, resulting in an information leak.
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 code page conversion writes one extra character because the destination buffer size was calculated assuming UTF-8 but the actual conversion used a different code page, overwriting the null terminator.
Impact
An attacker could leak heap memory and use it to bypass mitigations when exploiting another vulnerability.
What the attacker needed
Victim opens a malformed JPEG file
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.
This bug is in a Windows library that reads image files. When it processes a specially crafted JPEG, it fails to properly end a text string, so when it later copies that string it reads past the end of the buffer. That can expose random memory contents to an attacker, which might help them defeat security protections.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.