Every CVE Search/ Get API key

CVE-2026-40685

In Exim before 4.99.2, when JSON lookup is enabled, an out-of-bounds heap write can occur when a...

6.5 MediumFix available

In Exim before 4.99.2, when JSON lookup is enabled, an out-of-bounds heap write can occur when a JSON operator encounters malformed JSON in an untrusted header, because of an incorrect implementation of \ skipping.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
High
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
None
Integrity
Low
Availability
High

Exploit likelihood

0.32%Up 0.3 points since May 1, 2026
90%50%10%1%

What each source reports

CVE List Score used 6.5

In Exim before 4.99.2, when JSON lookup is enabled, an out-of-bounds heap write can occur when a JSON operator encounters malformed JSON in an untrusted header, because of an incorrect implementation of \ skipping.

Record
CVE-2026-40685
CVSS 3.1
6.5 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:H
Weakness
CWE-684
Updated
2026-11-02
EUVDEUVD-2026-26443 6.5

In Exim before 4.99.2, when JSON lookup is enabled, an out-of-bounds heap write can occur when a JSON operator encounters malformed JSON in an untrusted header, because of an incorrect implementation of \ skipping.

Record
EUVD-2026-26443
CVSS 3.1
6.5 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:H
Updated
2026-11-02
GitHub AdvisoriesGHSA-pph6-fvmv-fjrc 6.5

In Exim before 4.99.2, when JSON lookup is enabled, an out-of-bounds heap write can occur when a...

In Exim before 4.99.2, when JSON lookup is enabled, an out-of-bounds heap write can occur when a JSON operator encounters malformed JSON in an untrusted header, because of an incorrect implementation of \ skipping.

Record
GHSA-pph6-fvmv-fjrc
CVSS 3.1
6.5 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:H
Weakness
CWE-684, CWE-787
Updated
2026-11-02
NVD 6.5

In Exim before 4.99.2, when JSON lookup is enabled, an out-of-bounds heap write can occur when a JSON operator encounters malformed JSON in an untrusted header, because of an incorrect implementation of \ skipping.

Record
CVE-2026-40685
CVSS 3.1
6.5 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:H
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-684, CWE-787
Updated
2026-11-02
OSVALPINE-CVE-2026-40685 9.8

In Exim before 4.99.2, when JSON lookup is enabled, an out-of-bounds heap write can occur when a JSON operator encounters malformed JSON in an untrusted header, because of an incorrect implementation of \ skipping.

Record
ALPINE-CVE-2026-40685
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-03
OSVDEBIAN-CVE-2026-40685 9.8

In Exim before 4.99.2, when JSON lookup is enabled, an out-of-bounds heap write can occur when a JSON operator encounters malformed JSON in an untrusted header, because of an incorrect implementation of \ skipping.

Record
DEBIAN-CVE-2026-40685
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
Show 9 moreShow less
OSVUBUNTU-CVE-2026-40685 6.5

In Exim before 4.99.2, when JSON lookup is enabled, an out-of-bounds heap write can occur when a JSON operator encounters malformed JSON in an untrusted header, because of an incorrect implementation of \ skipping.

Record
UBUNTU-CVE-2026-40685
CVSS 3.1
6.5 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:H
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVCLSA-2026-1778003565 No score

Fix CVE(s): CVE-2026-40684, CVE-2026-40685, CVE-2026-40687

  • SECURITY UPDATE: out-of-bounds read in DNS reverse-lookup escape decoding when running against musl libc
    • debian/patches/CVE-2026-40684.patch: harden string_copy_dnsdomain() to consume 1, 2, or 3 digits incrementally instead of indexing past the input string when fewer than 3 digits follow a backslash escape
    • CVE-2026-40684
  • SECURITY UPDATE: out-of-bounds heap write in JSON dewrap on malformed header value ending in a trailing backslash
    • debian/patches/CVE-2026-40685.patch: only skip a backslash in dewrap() when followed by a non-NUL character
    • CVE-2026-40685
  • SECURITY UPDATE: SPA authenticator out-of-bounds write and uninitialised-heap information disclosure
    • debian/patches/CVE-2026-40687.patch: zero the spa_base64_to_bits() output buffer to plug the infoleak; replace assert()-based length guards in unicodeToString(), strToUnicode(), and toString() with explicit length clamping to prevent OOB writes
    • CVE-2026-40687
Record
CLSA-2026-1778003565
Updated
2026-11-02
OSVCLSA-2026-1778147239 No score

exim: Fix of CVE-2026-40685

  • CVE-2026-40685: fix OOB heap write in dewrap() during JSON expansion
Record
CLSA-2026-1778147239
Updated
2026-11-02
OSVCLSA-2026-1778147777 No score

exim: Fix of CVE-2026-40685

  • CVE-2026-40685: fix OOB heap write in dewrap() during JSON expansion
Record
CLSA-2026-1778147777
Updated
2026-11-02
OSVCLSA-2026-1778173472 No score

exim: Fix of 2 CVEs

  • CVE-2026-40685: fix heap corruption when expanding malformed JSON
  • CVE-2026-40687: fix heap buffer overflow and infoleak in SPA authenticator
Record
CLSA-2026-1778173472
Updated
2026-11-02
OSVCLSA-2026-1778297730 No score

exim: Fix of 2 CVEs

  • CVE-2026-40685: dewrap() OOB read/write on trailing backslash in JSON header
  • CVE-2026-40687: SPA authenticator OOB read/write and base64 decode infoleak
  • Refresh Exim-Maintainers-Keyring.asc to verify the 4.99.x release tarball signature
Record
CLSA-2026-1778297730
Updated
2026-11-02
OSVCLSA-2026-1778690104 No score

exim: Fix of CVE-2026-40685

  • CVE-2026-40685: fix OOB heap write in dewrap() when expanding header ending with stray backslash
Record
CLSA-2026-1778690104
Updated
2026-11-02
OSVUSN-8228-1 No score

exim4 vulnerabilities

It was discovered that Exim incorrectly handled parsing malformed JSON in message headers. A remote attacker could possibly use this issue to execute arbitrary code. (CVE-2026-40685)

It was discovered that Exim incorrectly handled processing of UTF-8 trailing characters. A remote attacker could possibly use this issue to obtain sensitive information. (CVE-2026-40686)

It was discovered that Exim incorrectly handled SPA authenticator input. An authenticated user could possibly use this issue to execute arbitrary code. (CVE-2026-40687)

Record
USN-8228-1
Updated
2026-11-02
OSVUSN-8382-1 No score

exim4 vulnerabilities

Timo Longin discovered that Exim incorrectly handled certain SMTP messages in PIPELINING/CHUNKING configurations. A remote attacker could possibly use this issue to perform SMTP smuggling. This issue only affected Ubuntu 14.04 LTS. (CVE-2023-51766)

It was discovered that Exim incorrectly handled certain malformed JSON data in headers. A remote attacker could possibly use this issue to crash Exim, resulting in a denial of service, or execute arbitrary code. This issue only affected Ubuntu 20.04 LTS. (CVE-2026-40685)

It was discovered that Exim incorrectly handled certain malformed UTF-8 headers. A remote attacker could possibly use this issue to obtain sensitive information. This issue only affected Ubuntu 20.04 LTS. (CVE-2026-40686)

It was discovered that Exim incorrectly handled certain SPA resources. A remote attacker could possibly use this issue to crash Exim, resulting in a denial of service, or obtain sensitive information. This issue only affected Ubuntu 20.04 LTS. (CVE-2026-40687)

It was discovered that Exim incorrectly handled certain CHUNKING transfers in some GnuTLS configurations. A remote attacker could possibly use this issue to crash Exim, resulting in a denial of service, or execute arbitrary code. This issue only affected Ubuntu 20.04 LTS. (CVE-2026-45185)

Warisjeet Singh discovered that Exim incorrectly handled certain proxy connections in builds with proxy support enabled. A remote attacker could possibly use this issue to obtain sensitive information. This issue only affected Ubuntu 16.04 LTS, Ubuntu 18.04 LTS, and Ubuntu 20.04 LTS. (CVE-2026-48840)

Record
USN-8382-1
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
exim
Alpine:v3.23
before 4.98.2-r0
4.98.2-r0
exim
Alpine:v3.24
before 4.98.2-r0
4.98.2-r0
exim4
TuxCare:Ubuntu:20.04
before 4.93-13ubuntu1.12+tuxcare.els1
4.93-13ubuntu1.12+tuxcare.els1
exim4-base
TuxCare:Ubuntu:20.04
before 4.93-13ubuntu1.12+tuxcare.els1
4.93-13ubuntu1.12+tuxcare.els1
exim4-config
TuxCare:Ubuntu:20.04
before 4.93-13ubuntu1.12+tuxcare.els1
4.93-13ubuntu1.12+tuxcare.els1
exim4-daemon-heavy
TuxCare:Ubuntu:20.04
before 4.93-13ubuntu1.12+tuxcare.els1
4.93-13ubuntu1.12+tuxcare.els1
exim4-daemon-light
TuxCare:Ubuntu:20.04
before 4.93-13ubuntu1.12+tuxcare.els1
4.93-13ubuntu1.12+tuxcare.els1
exim4-dev
TuxCare:Ubuntu:20.04
before 4.93-13ubuntu1.12+tuxcare.els1
4.93-13ubuntu1.12+tuxcare.els1
eximon4
TuxCare:Ubuntu:20.04
before 4.93-13ubuntu1.12+tuxcare.els1
4.93-13ubuntu1.12+tuxcare.els1
exim
TuxCare:OracleLinux:6
before 4.92.3-3.el6.tuxcare.els8
4.92.3-3.el6.tuxcare.els8
Show 39 moreShow less
Affected packages
PackageAffectedFixed
exim-greylist
TuxCare:OracleLinux:6
before 4.92.3-3.el6.tuxcare.els8
4.92.3-3.el6.tuxcare.els8
exim-mon
TuxCare:OracleLinux:6
before 4.92.3-3.el6.tuxcare.els8
4.92.3-3.el6.tuxcare.els8
exim-mysql
TuxCare:OracleLinux:6
before 4.92.3-3.el6.tuxcare.els8
4.92.3-3.el6.tuxcare.els8
exim-pgsql
TuxCare:OracleLinux:6
before 4.92.3-3.el6.tuxcare.els8
4.92.3-3.el6.tuxcare.els8
exim
TuxCare:CentOS:6
before 4.92.3-3.el6.tuxcare.els8
4.92.3-3.el6.tuxcare.els8
exim-greylist
TuxCare:CentOS:6
before 4.92.3-3.el6.tuxcare.els8
4.92.3-3.el6.tuxcare.els8
exim-mon
TuxCare:CentOS:6
before 4.92.3-3.el6.tuxcare.els8
4.92.3-3.el6.tuxcare.els8
exim-mysql
TuxCare:CentOS:6
before 4.92.3-3.el6.tuxcare.els8
4.92.3-3.el6.tuxcare.els8
exim-pgsql
TuxCare:CentOS:6
before 4.92.3-3.el6.tuxcare.els8
4.92.3-3.el6.tuxcare.els8
exim
TuxCare:CentOS:7
before 4.97.1-1.el7.tuxcare.els2
4.97.1-1.el7.tuxcare.els2
exim-greylist
TuxCare:CentOS:7
before 4.97.1-1.el7.tuxcare.els2
4.97.1-1.el7.tuxcare.els2
exim-mon
TuxCare:CentOS:7
before 4.97.1-1.el7.tuxcare.els2
4.97.1-1.el7.tuxcare.els2
exim-mysql
TuxCare:CentOS:7
before 4.97.1-1.el7.tuxcare.els2
4.97.1-1.el7.tuxcare.els2
exim-pgsql
TuxCare:CentOS:7
before 4.97.1-1.el7.tuxcare.els2
4.97.1-1.el7.tuxcare.els2
exim-sysvinit
TuxCare:CentOS:7
before 4.97.1-1.el7.tuxcare.els2
4.97.1-1.el7.tuxcare.els2
exim
TuxCare:AlmaLinux:9.2
before 4.99.1-1.el9_2.tuxcare.els1
4.99.1-1.el9_2.tuxcare.els1
exim-greylist
TuxCare:AlmaLinux:9.2
before 4.99.1-1.el9_2.tuxcare.els1
4.99.1-1.el9_2.tuxcare.els1
exim-mon
TuxCare:AlmaLinux:9.2
before 4.99.1-1.el9_2.tuxcare.els1
4.99.1-1.el9_2.tuxcare.els1
exim-mysql
TuxCare:AlmaLinux:9.2
before 4.99.1-1.el9_2.tuxcare.els1
4.99.1-1.el9_2.tuxcare.els1
exim-pgsql
TuxCare:AlmaLinux:9.2
before 4.99.1-1.el9_2.tuxcare.els1
4.99.1-1.el9_2.tuxcare.els1
exim
TuxCare:AlmaLinux:9.6
before 4.99.1-1.el9.tuxcare.els2
4.99.1-1.el9.tuxcare.els2
exim-greylist
TuxCare:AlmaLinux:9.6
before 4.99.1-1.el9.tuxcare.els2
4.99.1-1.el9.tuxcare.els2
exim-mon
TuxCare:AlmaLinux:9.6
before 4.99.1-1.el9.tuxcare.els2
4.99.1-1.el9.tuxcare.els2
exim-mysql
TuxCare:AlmaLinux:9.6
before 4.99.1-1.el9.tuxcare.els2
4.99.1-1.el9.tuxcare.els2
exim-pgsql
TuxCare:AlmaLinux:9.6
before 4.99.1-1.el9.tuxcare.els2
4.99.1-1.el9.tuxcare.els2
exim4
Debian:12
before 4.96-15+deb12u9, plus listed versions
4.96-154.96-15+deb12u14.96-15+deb12u24.96-15+deb12u34.96-15+deb12u4
Show 4 moreShow less
4.96-15+deb12u54.96-15+deb12u64.96-15+deb12u74.96-15+deb12u8
4.96-15+deb12u9
exim4
Debian:13
before 4.98.2-1+deb13u2, plus listed versions
4.98.2-14.98.2-1+deb13u1
4.98.2-1+deb13u2
exim4
Debian:14
before 4.99.2-1, plus listed versions
4.98.2-14.98.2-1+hurd.14.98.2-24.99-14.99-2
Show 20 moreShow less
4.99-34.99-44.99-4~bpo13+14.99-54.99-64.99-6~bpo13+14.99-74.99-7~bpo13+14.99.1-14.99.1-1~bpo13+14.99.1-24.99.1-34.99.1-44.99.1-54.99.1-64.99.2-1~bpo13+14.99~RC1-14.99~RC2-14.99~RC3-14.99~RC3-2
4.99.2-1
exim4
Ubuntu:Pro:14.04:LTS
All versions, plus listed versions
4.80-7ubuntu34.80-7ubuntu44.80-9ubuntu14.80-9ubuntu24.82-3ubuntu1
Show 13 moreShow less
4.82-3ubuntu24.82-3ubuntu2.14.82-3ubuntu2.24.82-3ubuntu2.34.82-3ubuntu2.44.82-3ubuntu2.4+esm14.82-3ubuntu2.4+esm24.82-3ubuntu2.4+esm34.82-3ubuntu2.4+esm44.82-3ubuntu2.4+esm64.82-3ubuntu2.4+esm74.82-3ubuntu2.4+esm84.82-3ubuntu2.4+esm9
None known
exim4
Ubuntu:Pro:16.04:LTS
All versions, plus listed versions
4.86-3ubuntu14.86-7ubuntu14.86-7ubuntu24.86-7ubuntu34.86.2-2ubuntu1
Show 15 moreShow less
4.86.2-2ubuntu24.86.2-2ubuntu2.14.86.2-2ubuntu2.24.86.2-2ubuntu2.34.86.2-2ubuntu2.44.86.2-2ubuntu2.54.86.2-2ubuntu2.64.86.2-2ubuntu2.6+esm14.86.2-2ubuntu2.6+esm24.86.2-2ubuntu2.6+esm44.86.2-2ubuntu2.6+esm54.86.2-2ubuntu2.6+esm64.86.2-2ubuntu2.6+esm74.86.2-2ubuntu2.6+esm84.86.2-2ubuntu2.6+esm9
None known
exim4
Ubuntu:Pro:18.04:LTS
All versions, plus listed versions
4.89-5ubuntu14.89-9ubuntu14.89-9ubuntu24.89-9ubuntu34.89-9ubuntu4
Show 15 moreShow less
4.90.1-1ubuntu14.90.1-1ubuntu1.14.90.1-1ubuntu1.24.90.1-1ubuntu1.34.90.1-1ubuntu1.44.90.1-1ubuntu1.54.90.1-1ubuntu1.84.90.1-1ubuntu1.94.90.1-1ubuntu1.104.90.1-1ubuntu1.10+esm14.90.1-1ubuntu1.10+esm24.90.1-1ubuntu1.10+esm34.90.1-1ubuntu1.10+esm44.90.1-1ubuntu1.10+esm54.90.1-1ubuntu1.10+esm6
None known
exim4
Ubuntu:Pro:20.04:LTS
before 4.93-13ubuntu1.12+esm1, plus listed versions
4.92.1-1ubuntu34.92.1-1ubuntu44.93~RC2-1ubuntu14.93-9ubuntu14.93-11ubuntu1
Show 11 moreShow less
4.93-12ubuntu14.93-13ubuntu14.93-13ubuntu1.14.93-13ubuntu1.54.93-13ubuntu1.64.93-13ubuntu1.74.93-13ubuntu1.84.93-13ubuntu1.94.93-13ubuntu1.104.93-13ubuntu1.114.93-13ubuntu1.12
4.93-13ubuntu1.12+esm1
exim4
Ubuntu:22.04:LTS
before 4.95-4ubuntu2.7, plus listed versions
4.94.2-7ubuntu24.95-2ubuntu24.95-4ubuntu14.95-4ubuntu24.95-4ubuntu2.1
Show 5 moreShow less
4.95-4ubuntu2.24.95-4ubuntu2.34.95-4ubuntu2.44.95-4ubuntu2.54.95-4ubuntu2.6
4.95-4ubuntu2.7
exim4
Ubuntu:24.04:LTS
before 4.97-4ubuntu4.4, plus listed versions
4.96-17ubuntu24.96-17ubuntu2.14.97-3ubuntu14.97-4ubuntu14.97-4ubuntu3
Show 4 moreShow less
4.97-4ubuntu44.97-4ubuntu4.14.97-4ubuntu4.24.97-4ubuntu4.3
4.97-4ubuntu4.4
exim4
Ubuntu:25.10
before 4.98.2-1ubuntu2.1, plus listed versions
4.98.1-1ubuntu24.98.2-1ubuntu14.98.2-1ubuntu2
4.98.2-1ubuntu2.1
exim4
Ubuntu:26.04:LTS
before 4.99.1-1ubuntu1.1, plus listed versions
4.98.2-1ubuntu24.99-4ubuntu14.99.1-1ubuntu1
4.99.1-1ubuntu1.1
exim4
Ubuntu:Pro:14.04:LTS
before 4.82-3ubuntu2.4+esm9, plus listed versions
4.80-7ubuntu34.80-7ubuntu44.80-9ubuntu14.80-9ubuntu24.82-3ubuntu1
Show 12 moreShow less
4.82-3ubuntu24.82-3ubuntu2.14.82-3ubuntu2.24.82-3ubuntu2.34.82-3ubuntu2.44.82-3ubuntu2.4+esm14.82-3ubuntu2.4+esm24.82-3ubuntu2.4+esm34.82-3ubuntu2.4+esm44.82-3ubuntu2.4+esm64.82-3ubuntu2.4+esm74.82-3ubuntu2.4+esm8
4.82-3ubuntu2.4+esm9
exim4
Ubuntu:Pro:16.04:LTS
before 4.86.2-2ubuntu2.6+esm9, plus listed versions
4.86-3ubuntu14.86-7ubuntu14.86-7ubuntu24.86-7ubuntu34.86.2-2ubuntu1
Show 14 moreShow less
4.86.2-2ubuntu24.86.2-2ubuntu2.14.86.2-2ubuntu2.24.86.2-2ubuntu2.34.86.2-2ubuntu2.44.86.2-2ubuntu2.54.86.2-2ubuntu2.64.86.2-2ubuntu2.6+esm14.86.2-2ubuntu2.6+esm24.86.2-2ubuntu2.6+esm44.86.2-2ubuntu2.6+esm54.86.2-2ubuntu2.6+esm64.86.2-2ubuntu2.6+esm74.86.2-2ubuntu2.6+esm8
4.86.2-2ubuntu2.6+esm9
exim4
Ubuntu:Pro:18.04:LTS
before 4.90.1-1ubuntu1.10+esm6, plus listed versions
4.89-5ubuntu14.89-9ubuntu14.89-9ubuntu24.89-9ubuntu34.89-9ubuntu4
Show 14 moreShow less
4.90.1-1ubuntu14.90.1-1ubuntu1.14.90.1-1ubuntu1.24.90.1-1ubuntu1.34.90.1-1ubuntu1.44.90.1-1ubuntu1.54.90.1-1ubuntu1.84.90.1-1ubuntu1.94.90.1-1ubuntu1.104.90.1-1ubuntu1.10+esm14.90.1-1ubuntu1.10+esm24.90.1-1ubuntu1.10+esm34.90.1-1ubuntu1.10+esm44.90.1-1ubuntu1.10+esm5
4.90.1-1ubuntu1.10+esm6

History

History
RecordedChangedSources
affected, aliases, referencesOSV
first indexedCVE List, EUVD, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2026-40685 is a medium vulnerability (CVSS 6.5) in Exim, published April 29, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.32%, the 25th percentile. Fixed in exim 4.98.2-r0.

References

Show 19 moreShow less
MoveEnter Open