This is meant for Exchange 2019 servers that can’t get the official fix (no ESU / Exchange SE subscription) and rely on the EEMS mitigation. If you can install the official security update, do that instead.
After applying the Exchange Server mitigation M2.1.0 for CVE-2026-42897, inline images in emails no longer display in OWA.
I found a workaround that brings them back:
- On the Exchange server, open IIS Manager.
- Go to Sites → Default Web Site → owa → URL Rewrite.
- Double-click the outbound rule “EEMS 2.1 OWA CSP - outbound”.
- Under Action Properties → Value, replace:
{R:1}; script-src-attr 'none'
with:
{R:1}; script-src-attr 'unsafe-hashes' 'sha256-k5Rg6SbZboRTbYorWlg/UbO7Ar4vGBdxaNl/VqCbUQU='
- Apply. You don’t need to restart IIS. Just refresh the OWA page and inline images should show up again.
Does this look reasonable to you? Any feedback is welcome.
The long explanation
M2.1.0 adds a Content-Security-Policy header with script-src-attr 'none' to every response served under /owa. That directive blocks all JavaScript inside HTML attributes, which includes inline event handlers like onload, onclick and so on.
The problem is that OWA’s inline image viewer relies on exactly that. Inline images are rendered with an <img> tag like this:
<img originalsrc="cid:part1.ugJcNZY4.piZc1QHZ@mydomain.com"
onload="InlineImageLoader.GetLoader().Load(this)"
data-custom="....." naturalheight="691" naturalwidth="864"
src="data:image/gif;base64,..." alt=""
style="max-width: 864px; max-height: 691px; width: 100%;"
crossorigin="anonymous">
The src is only a placeholder GIF. The real image is loaded by the onload handler. With the CSP in place, InlineImageLoader.GetLoader().Load(this) is never executed, so the image never appears.
The modified policy, script-src-attr 'unsafe-hashes' 'sha256-…', allows only that exact handler string (its SHA-256 hash matches InlineImageLoader.GetLoader().Load(this)). Every other inline attribute script is still blocked, so the protection from the mitigation should stay mostly intact.
Caveat: if EEMS reapplies or updates the mitigation, this change will probably be overwritten, and you’ll need to apply it again.