CyberSecBulletin
CVE-2021-27065Exploited in the wildNVD status: Analyzed

Microsoft Exchange Server Remote Code Execution

CVE-2021-27065 is a high-severity improper limitation of a pathname to a restricted directory vulnerability in Microsoft Exchange Server 2013 Cumulative Update 21 from Microsoft, with a CVSS 3.1 base score of 7.8 out of 10. It can be exploited with local access to the system by an unauthenticated attacker, but only if a user takes part, for example by opening a link or file. The record lists version 15.00.1395.012 as the first without the flaw, so updating Microsoft Exchange Server 2013 Cumulative Update 21 to that release or later removes the exposure. CISA added it to the Known Exploited Vulnerabilities catalogue on November 3, 2021, which means attacks have been observed in the wild, including in ransomware campaigns.

Patch now

Attackers are already exploiting this vulnerability, according to CISA.

What to do

  1. Update Microsoft Exchange Server 2013 Cumulative Update 21 to 15.00.1395.012 or a later version.
  2. Update Microsoft Exchange Server 2013 Cumulative Update 22 to 15.00.1473.006 or a later version.
  3. Update Microsoft Exchange Server 2013 Cumulative Update 23 to 15.00.1497.012 or a later version.
  4. CISA's required action: Apply updates per vendor instructions.
  5. Read the advisory on msrc.microsoft.com for workarounds and exact fixed builds.
  6. Because the attack needs a user to take part, warn users about unexpected links and files related to this product until it is patched.

Affected products and versions

VendorProductAffected versionsFixed in
MicrosoftMicrosoft Exchange Server 2013 Cumulative Update 2115.00.0 up to, but not including, 15.00.1395.01215.00.1395.012
MicrosoftMicrosoft Exchange Server 2013 Cumulative Update 2215.00.0 up to, but not including, 15.00.1473.00615.00.1473.006
MicrosoftMicrosoft Exchange Server 2013 Cumulative Update 2315.00.0 up to, but not including, 15.00.1497.01215.00.1497.012
MicrosoftMicrosoft Exchange Server 2013 Service Pack 115.00.0 up to, but not including, 15.00.0847.06415.00.0847.064
MicrosoftMicrosoft Exchange Server 2016 Cumulative Update 1015.01.0 up to, but not including, 15.01.1531.01215.01.1531.012
MicrosoftMicrosoft Exchange Server 2016 Cumulative Update 1115.01.0 up to, but not including, 15.01.1591.01815.01.1591.018
MicrosoftMicrosoft Exchange Server 2016 Cumulative Update 1215.01.0 up to, but not including, 15.01.1713.01015.01.1713.010
MicrosoftMicrosoft Exchange Server 2016 Cumulative Update 1315.01.0 up to, but not including, 15.01.1779.00815.01.1779.008
MicrosoftMicrosoft Exchange Server 2016 Cumulative Update 1415.01.0 up to, but not including, 15.01.1847.01215.01.1847.012
MicrosoftMicrosoft Exchange Server 2016 Cumulative Update 1515.01.0 up to, but not including, 15.01.1913.01215.01.1913.012
MicrosoftMicrosoft Exchange Server 2016 Cumulative Update 1615.01.0 up to, but not including, 15.01.1979.00815.01.1979.008
MicrosoftMicrosoft Exchange Server 2016 Cumulative Update 1715.01.0 up to, but not including, 15.01.2044.01315.01.2044.013
MicrosoftMicrosoft Exchange Server 2016 Cumulative Update 1815.01.0 up to, but not including, 15.01.2106.01315.01.2106.013
MicrosoftMicrosoft Exchange Server 2016 Cumulative Update 1915.01.0 up to, but not including, 15.01.2176.00915.01.2176.009
MicrosoftMicrosoft Exchange Server 2016 Cumulative Update 815.01.0 up to, but not including, 15.01.1415.01015.01.1415.010
MicrosoftMicrosoft Exchange Server 2016 Cumulative Update 915.01.0 up to, but not including, 15.01.1466.01615.01.1466.016
MicrosoftMicrosoft Exchange Server 201915.02.0 up to, but not including, 15.02.0221.01815.02.0221.018
MicrosoftMicrosoft Exchange Server 2019 Cumulative Update 115.02.0 up to, but not including, 15.01.1979.00615.01.1979.006
MicrosoftMicrosoft Exchange Server 2019 Cumulative Update 215.02.0 up to, but not including, 15.02.0397.01115.02.0397.011
MicrosoftMicrosoft Exchange Server 2019 Cumulative Update 315.02.0 up to, but not including, 15.02.0464.01515.02.0464.015
MicrosoftMicrosoft Exchange Server 2019 Cumulative Update 415.02.0 up to, but not including, 15.02.0659.01215.02.0659.012
MicrosoftMicrosoft Exchange Server 2019 Cumulative Update 515.02.0 up to, but not including, 15.02.0595.00815.02.0595.008
MicrosoftMicrosoft Exchange Server 2019 Cumulative Update 615.02.0 up to, but not including, 15.02.0529.01315.02.0529.013
MicrosoftMicrosoft Exchange Server 2019 Cumulative Update 715.02.0 up to, but not including, 15.02.0721.01315.02.0721.013
MicrosoftMicrosoft Exchange Server 2019 Cumulative Update 815.02.0 up to, but not including, 15.02.0792.01015.02.0792.010

Version data comes from the organisation that assigned the CVE; 1 further products are omitted here. Confirm against the vendor advisory before deciding you are unaffected.

How the severity score breaks down

Attack vector
LocalThe attacker needs local access or must trick a user into running something.
Attack complexity
LowNo special conditions are needed; the attack works reliably.
Privileges required
NoneNo account or login is needed.
User interaction
RequiredA user must take an action such as opening a file or link.
Scope
UnchangedImpact stays within the vulnerable component.
Confidentiality
HighAll data handled by the component can be read.
Integrity
HighData or code can be modified at will.
Availability
HighThe component can be taken down completely.

Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H. Scored by NVD.

Scoring systemScoreSeverityScored by
CVSS 3.17.8HighCNA (microsoft.com)
CVSS 3.17.8HighNVD
CVSS 2.06.8MediumNVD

Official description

Microsoft Exchange Server Remote Code Execution Vulnerability

Source: the CVE record as published by its numbering authority, via NVD and CVE.org.

The underlying weakness: Improper Limitation of a Pathname to a Restricted Directory

The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.

How developers prevent this class of flaw

  • For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side, in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server.
  • Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid.
  • Use an application firewall that can detect attacks against this weakness. It can be beneficial in cases in which the code cannot be fixed (because it is controlled by a third party), as an emergency prevention measure while more comprehensive software assurance measures are applied, or to provide defense in depth.

More Improper Limitation of a Pathname to a Restricted Directory vulnerabilities (CWE-22)

Timeline

  1. CVE record published.
  2. Added to CISA's Known Exploited Vulnerabilities catalogue.
  3. Deadline for US federal agencies to remediate, set by CISA.
  4. CISA published its SSVC assessment (exploitation: active, automatable: yes, technical impact: total).
  5. Record last changed materially (score, affected products, status or references).

References

Third-party and government advisories

Technical write-ups (may include proof of concept)

Other vulnerabilities in Microsoft Exchange Server 2013 Cumulative Update 21

All Microsoft Exchange Server 2013 Cumulative Update 21 vulnerabilities

Recent Improper Limitation of a Pathname to a Restricted Directory vulnerabilities

Spotted an error? Tell us.