EXIM Vulnerability (CVE-2022-37452) – Summary

Technical Advice

The vulnerability described on this and the following page affects various versions of the EXIM mail transfer agent up to but excluding version 4.95. If you have one of these versions of EXIM, you may be at risk of this vulnerability being exploited.

The Operation Configured team have contacted you because research indicates that your organisation or an organisation your ICT team supports may have this vulnerability and the EXIM server is exposed to the public internet. While it is possible that this information is incorrect because of the method of vulnerability identification employed by the Operation, it is important you establish for yourself whether the organisation is vulnerable. If you establish that the systems are vulnerable, there is an increased risk they will fall victim to a potentially devastating criminal cyber-attack as a result.

There is another, non-technical summary of this vulnerability available for decision-makers. You will need to support them in making choices about how to approach this situation.

IMPORTANT: While SEROCU are notifying organisations of this vulnerability, the team will NOT be asking for any information or other details. They will only be providing information. Any unsolicited contact claiming to be from the Police should always be treated with caution. For more information read about Verifying Authenticity.

About this Vulnerability

In August 2022, researchers discovered this vulnerability affecting multiple versions of EXIM. It potentially allows attackers to remotely execute code arbitrary with root (admin) privileges for the alias list in ‘host_name_lookup’ in ‘host.c’ when the variable ‘sender_host_name’ is set.  The Exim developers only implemented proper bounds checking and data validation in later versions.  Exploiting this vulnerability could theoretically cause data to be written beyond the normal allocated memory bounds of the temporary storage buffer on the heap (memory region for dynamic memory allocation).  Consequently, this leads to adjacent memory locations being overwritten and causing unintended consequences for Exim.

The ‘buffer overflow’ could allow attackers to view, modify, and delete data if exploited. From here it could allow attackers to install programs and create new privileged accounts.  Potential scenarios that may arise include denial-of-service, security breaches and data leaks.

The Common Vulnerabilities and Exposures (CVE) reference number and summary for this vulnerability is CVE-2019-10149 and has a CVSS Score of 9.8 / 10.0).

Crypto-jacking effectively uses your computer power and electricity in efforts to generate criminals their own cryptocurrency.  This effectively decreases the speed and efficiency of your network and reduces the operational time these servers work before developing a fault.

The Common Vulnerabilities and Exposures (CVE) reference number and summary for this vulnerability is:

CVE-2019-13917 (CVSS Score 9.8 / 10.0) – This ‘Critical’ vulnerability allows a remote attacker to execute code as ‘root’ by connecting to the SMTP listener daemon, when Exim servers have non-default (and unusual) configurations that use the ${sort } expansion. 

Further Information

CVE-2022-37452: Exim heap-based buffer overflow vulnerability (securityonline.info)

CVE-2022-37452 : Exim before 4.95 has a heap-based buffer overflow for the alias list in host_name_lookup in host.c when sender_host_name (cvedetails.com)

Exim has seen an increased focus from security researchers discovering and publicly disclosing several vulnerabilities in the application since 2021, including the Qualys research team who discovered 21 vulnerabilities with Exim in 2021, later coined the ’21 nails’ vulnerabilities and 10 were remotely exploitable by attackers.

May 2021 – Qualys.com/2021/05/04/21nails/21nails.txt

May 2021 – 21 nails in Exim mail server: Vulnerabilities enable ‘full remote unauthenticated code execution’, millions of boxes at risk – The Register

May 2021 – Critical 21Nails Exim bugs expose millions of servers to attacks – bleepingcomputer.com

May 2021 – 21nails: Reporting on Vulnerable SMTP/Exim Servers | The Shadowserver Foundation


The Risk this Vulnerability poses

Research conducted around this CVE shows that :

  • it is remotely and locally exploitable by an attacker.
  • user interaction is not required to exploit.
  • the complexity required to exploit is low (meaning a relatively unskilled attacker can achieve this).
  • no privileges are required to exploit.

If the vulnerability is exploited, it can risk the complete loss of confidentiality, integrity and availability of the server. Taking the worst case scenario, this could result in all of the resources being disclosed to an attacker and presents a direct serious impact to an organisation’s network. It is possible for an attacker to modify any or all files, so any malicious modification would present a direct, serious consequence. If this CVE is exploited, it can risk the complete loss of confidentiality and integrity of the server.

This could result in all of the resources being disclosed to an attacker and presents a direct serious impact to an organisation’s systems / network.

There are risks should you choose to ignore or accept this vulnerability remaining in your system. Criminals are known to have been scanning for vulnerable EXIM servers and using them to attack and exploit organisations. Consequences may include, but are not limited to:

  • Access to sensitive / confidential data
  • Add unauthorised privileged accounts / users on the server
  • Disable network security settings
  • Theft of data and electricity (crypto-mining)
  • Increased degradation of affected hardware
  • Corruption of your backups
  • Using you to attack others that you work with, damaging your reputation
  • Ransomware attack against your systems
  • Fines from regulators such as the Information Commissioner’s Office (ICO)
  • Your organisation ceasing operations because of system failure, reputational damage or financial losses


Next Steps

The next steps for the organisation should be to:

  1. Verify the presence of this vulnerability in the organisation; if so:
  2. Establish if these vulnerability has already been exploited on the organisation’s systems
  3. Work with management to establish the degree of threat, potential harm and risk posed to the organisation
  4. Isolate and mitigate the risk as soon as possible
  5. Establish a plan to resolve this vulnerability and eliminate the risk
  6. Plan to improve the organisation’s cybersecurity for the future

For more information: