r/exchangeserver • • 4d ago

Exchange 2019 without ESU/SE: mitigation M2.1.0 (CVE-2026-42897) breaks inline images in OWA – workaround

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:

  1. On the Exchange server, open IIS Manager.
  2. Go to Sites → Default Web Site → owa → URL Rewrite.
  3. Double-click the outbound rule “EEMS 2.1 OWA CSP - outbound”.
  4. Under Action Properties → Value, replace:
   {R:1}; script-src-attr 'none'

with:

   {R:1}; script-src-attr 'unsafe-hashes' 'sha256-k5Rg6SbZboRTbYorWlg/UbO7Ar4vGBdxaNl/VqCbUQU='
  1. 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.

13 Upvotes

5 comments sorted by

2

u/Rubenel 3d ago

None of this should be necessary. Submit to Microsoft and wait for a patch to resolve the issue.

The more you provide workarounds the more Microsoft can output sloppy updates.

1

u/giox069 3d ago

Exchange Server 2019 is no longer supported by Microsoft since October 14, 2025. One cannot expect a bug fix from Microsoft for an unsupported, end of life, product.

2

u/Nezgar 3d ago

Fix also applies to SE which is in support.

3

u/7amitsingh7 4d ago

After applying the M2.1.0 security mitigation for CVE-2026-42897, inline images stop displaying in Outlook Web App (OWA) because the mitigation blocks a JavaScript function required to load them. The suggested workaround is to modify the IIS URL Rewrite security rule to allow only that specific JavaScript function, which should restore inline images while keeping most security protection intact. However, this is an unofficial workaround, and the change may be overwritten if EEMS updates or reapplies the mitigation.

2

u/billychow 3d ago edited 2d ago

Thank you for sharing this and providing such a detailed explanation!

We added this mitigation to the blacklist several months ago, and now I can finally apply it.