# What is CVE-2023-28840?

> CVE-2023-28840 is a high-severity flaw (CVSS 8.7) in Moby from Mobyproject, published on 4 April 2023. It is not on the list of flaws known to be exploited today. The latest forecast puts its chance of use in the next 30 days at 2.6%. If you run an affected version, plan in the vendor’s fix.

Canonical page: https://www.precursorintelligence.com/what-is/cve-2023-28840

## At a glance

- **Verdict:** Plan it in. No sign of exploitation and a low forecast. Patch it in your normal update cycle.
- **Precursor Intelligence risk score:** 56 out of 100 (Medium); action: Plan remediation. Kept up to date as the evidence changes.
- **Severity:** High (CVSS 8.7 out of 10)
- **Known to be exploited:** No, not on the list of flaws known to be exploited today
- **Chance of use in the next 30 days:** 2.6% (latest exploit-likelihood forecast)
- **Published:** 4 April 2023
- **Record last updated:** 15 September 2023
- **Main product:** Moby from Mobyproject
- **Affected products:** 1

## What is CVE-2023-28840? In plain terms

It can be attacked from anywhere on the internet without logging in, and nobody has to click anything. If it works, the attacker can change data and take it offline.

### The official description

Moby is an open source container framework developed by Docker Inc. that is distributed as Docker, Mirantis Container Runtime, and various other downstream projects/products. The Moby daemon component (`dockerd`), which is developed as moby/moby, is commonly referred to as *Docker*.

Swarm Mode, which is compiled in and delivered by default in dockerd and is thus present in most major Moby downstreams, is a simple, built-in container orchestrator that is implemented through a combination of SwarmKit and supporting network code.

The overlay network driver is a core feature of Swarm Mode, providing isolated virtual LANs that allow communication between containers and services across the cluster. This driver is an implementation/user of VXLAN, which encapsulates link-layer (Ethernet) frames in UDP datagrams that tag the frame with a VXLAN Network ID (VNI) that identifies the originating overlay network. In addition, the overlay network driver supports an optional, off-by-default encrypted mode, which is especially useful when VXLAN packets traverses an untrusted network between nodes.

Encrypted overlay networks function by encapsulating the VXLAN datagrams through the use of the IPsec Encapsulating Security Payload protocol in Transport mode. By deploying IPSec encapsulation, encrypted overlay networks gain the additional properties of source authentication through cryptographic proof, data integrity through check-summing, and confidentiality through encryption.

When setting an endpoint up on an encrypted overlay network, Moby installs three iptables (Linux kernel firewall) rules that enforce both incoming and outgoing IPSec. These rules rely on the u32 iptables extension provided by the xt_u32 kernel module to directly filter on a VXLAN packet's VNI field, so that IPSec guarantees can be enforced on encrypted overlay networks without interfering with other overlay networks or other users of VXLAN.

Two iptables rules serve to filter incoming VXLAN datagrams with a VNI that corresponds to an encrypted network and discards unencrypted datagrams. The rules are appended to the end of the INPUT filter chain, following any rules that have been previously set by the system administrator. Administrator-set rules take precedence over the rules Moby sets to discard unencrypted VXLAN datagrams, which can potentially admit unencrypted datagrams that should have been discarded.

The injection of arbitrary Ethernet frames can enable a Denial of Service attack. A sophisticated attacker may be able to establish a UDP or TCP connection by way of the container’s outbound gateway that would otherwise be blocked by a stateful firewall, or carry out other escalations beyond simple injection by smuggling packets into the overlay network.

Patches are available in Moby releases 23.0.3 and 20.10.24. As Mirantis Container Runtime's 20.10 releases are numbered differently, users of that platform should update to 20.10.16.

Some workarounds are available. Close the VXLAN port (by default, UDP port 4789) to incoming traffic at the Internet boundary to prevent all VXLAN packet injection, and/or ensure that the `xt_u32` kernel module is available on all nodes of the Swarm cluster.

### What kind of flaw is it?

- CWE-203: Observable Discrepancy
- CWE-420: Unprotected Alternate Channel
- CWE-636: Not Failing Securely ('Failing Open')
- CWE-755: Improper Handling of Exceptional Conditions

### How an attack on it works

- Where an attacker can be: Anywhere on the internet
- How hard it is to pull off: Hard: conditions must line up
- Login needed first: No login needed
- Does someone have to click: No, nobody has to do anything
- What an attacker gets: Can change data and take it offline

Severity vector: `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:H/A:H`

## Is CVE-2023-28840 being exploited? Not that we know of

It is not on the list of flaws known to be exploited today. The latest forecast puts the chance of it being used in the next 30 days at 2.6%. That can change at any time, which is why we keep watching.

Exploit likelihood over the last 7 days: 2.6%, 2.6%, 2.6%, 2.6%, 2.6%, 2.6%, 2.6%.

### Timeline

- 4 April 2023: Published
- 15 September 2023: Record last updated

### How Precursor Intelligence ranks it

CVE-2023-28840 scores **56 out of 100 (Medium)**, with the action "Plan remediation".

Every published flaw gets a risk score from 0 to 100, kept up to date as the evidence changes. Four things go into the score, from the one that counts most to the ones that count less:

- Evidence it is being exploited: biggest factor
- How severe it is: strong factor
- How widely exposed it is: smaller factor
- Threat activity around it: smaller factor

85 and above is Critical. Anything confirmed as exploited is always marked for an emergency patch, whatever its score. When this flaw matches software you track, it lands in your list with its score and the reasons behind it.

## Who is affected by CVE-2023-28840?

The published record lists 1 product. Versions are as published: "1.12.0 to before 20.10.24" means from 1.12.0 up to, but not including, 20.10.24.

- [Moby](https://www.precursorintelligence.com/product/mobyproject/moby) by [Mobyproject](https://www.precursorintelligence.com/vendors/mobyproject) (Application): 1.12.0 to before 20.10.24, 23.0.0 to before 23.0.3

## How do I fix CVE-2023-28840?

1. **Check whether you run it.** Compare your versions with the affected products above. Not sure what you run? Precursor Intelligence can work it out from your public website, or you can pick it from a list.
2. **Apply the vendor’s fix.** Install the update named in the vendor’s advisory. We’ve put the advisories and patch notes first in the list.
3. **If you can’t patch today.** Follow any mitigation the vendor publishes, and limit who can reach the affected system from the internet until the update is in.
4. **Keep an eye on it.** Track the product and we tell you as soon as we spot this flaw on the list of exploited flaws, or a jump in its exploit likelihood.

### References

- [github.com](https://github.com/moby/moby/pull/45118) (Issue tracking, Patch)
- [github.com](https://github.com/moby/libnetwork/security/advisories/GHSA-gvm4-2qqg-m333) (Vendor advisory)
- [github.com](https://github.com/moby/moby/security/advisories/GHSA-232p-vwff-86mp) (Mitigation, Vendor advisory)
- [github.com](https://github.com/moby/moby/security/advisories/GHSA-vwm3-crmr-xfxw) (Vendor advisory)
- [github.com](https://github.com/moby/moby/issues/43382) (Exploit, Issue tracking, Third-party advisory)
- [github.com](https://github.com/moby/moby/security/advisories/GHSA-33pg-m6jh-5237) (Not applicable)
- [github.com](https://github.com/moby/moby/security/advisories/GHSA-6wrf-mxfj-pf5p) (Not applicable)
- [lists.fedoraproject.org](https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/LYZOKMMVX4SIEHPJW3SJUQGMO5YZCPHC/)
- [lists.fedoraproject.org](https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XNF4OLYZRQE75EB5TW5N42FSXHBXGWFE/)
- [lists.fedoraproject.org](https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZTE4ITXXPIWZEQ4HYQCB6N6GZIMWXDAI/)

## Questions

### What is CVE-2023-28840?

CVE-2023-28840 is a high-severity flaw in Moby from Mobyproject, published on 4 April 2023. It can be attacked from anywhere on the internet without logging in, and nobody has to click anything. If it works, the attacker can change data and take it offline.

### How serious is CVE-2023-28840?

It scores 8.7 out of 10 on the CVSS severity scale, which is high. Our risk score for CVE-2023-28840 is 56 out of 100, which is Medium. Its action is "Plan remediation". No sign of exploitation and a low forecast. Patch it in your normal update cycle.

### Is CVE-2023-28840 being exploited?

It is not on the list of flaws known to be exploited today. The latest forecast puts the chance of it being used in the next 30 days at 2.6%. That can change at any time, which is why we keep watching.

### Which versions does CVE-2023-28840 affect?

For Moby from Mobyproject: 1.12.0 to before 20.10.24, 23.0.0 to before 23.0.3.

### How do I fix CVE-2023-28840?

Install the update the vendor names in its advisory, linked first under "How do I fix" on this page. If you can't patch today, follow the vendor's mitigation and limit who can reach the affected system from the internet.

## Does CVE-2023-28840 affect you?

Precursor Intelligence keeps checking for you:

- **Tell us what you run.** Pick your software from a list, or let us work it out from your website.
- **We match it to every flaw.** Over 400,000 published flaws, checked against your list.
- **Ranked by real-world risk.** Every flaw gets a 0 to 100 risk score, kept up to date, led by evidence criminals are using it.
- **Told as soon as we know.** An alert by email, in the app or by webhook to your own tools.

Start free (no card, nothing to install): https://www.precursorintelligence.com/register
Book a demo: https://www.precursorintelligence.com/contact

