Skip to content
Memory corruption Write-up Advanced

Hacking Exchange from the Outside In

Microsoft Exchange used Oracle Outside-In libraries to parse email attachments when a mail flow inspection rule was configured, and these libraries contained memory-safety bugs. An attacker could send a crafted attachment that crashed the Exchange file scanner, though the text does not claim code execution.

atredis.com

Published on atredis.com

Microsoft Exchange 2019 prior to March 2024 used the Oracle Outside-In libraries to parse specific file types when attached to emails if an attachment inspection mail flow was configured. By default, Exchange has no mail flow rules configured.

The author, on atredis.com

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 write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely memory-safety flaws (use-after-free, invalid write, invalid read) in Oracle Outside-In parsing libraries that Exchange loads for attachment inspection.

Impact

An attacker could crash the Exchange attachment scanner by sending a crafted email, but the text does not show code execution and notes that a mail flow inspection rule must be configured.

What the attacker needed

Mail flow inspection rule configured; ability to send email to the server

The fix

Microsoft disabled the Outside-In libraries in Exchange in the March 2024 Patch Tuesday updates.

How it was found

  1. Configure a mail flow rule in Exchange that inspects attachments.
  2. Send an email to the Exchange server with a crafted attachment of a supported type.
  3. The server loads the relevant Outside-In library and crashes while parsing the 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 write-up has not been written yet. The Original tab links to the source.

Exchange is Microsoft's email server. When an administrator sets up a rule to inspect attachments, Exchange passes certain files to a third-party library called Oracle Outside-In, which tries to extract readable text. The researchers found that some specially crafted files make that library crash, which could disrupt the email scanning process.

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.

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.