# CVE-2021-31888: Memory corruption in APOGEE MBC (PPC) (BACnet)

> A stack-based buffer overflow in the FTP server allows remote attackers to execute arbitrary code or cause denial of service.

- **Severity:** High 8.8 (`CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 9 Nov 2021
- **Updated:** 3 Aug 2024
- **Also known as:** GHSA-825j-f8cf-xxrr

## What is CVE-2021-31888?

CVE-2021-31888 is a high-severity memory corruption vulnerability in Siemens APOGEE MBC (PPC) (BACnet), published on 9 Nov 2021. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

A vulnerability has been identified in APOGEE MBC (PPC) (BACnet) (All versions), APOGEE MBC (PPC) (P2 Ethernet) (All versions), APOGEE MEC (PPC) (BACnet) (All versions), APOGEE MEC (PPC) (P2 Ethernet) (All versions), APOGEE PXC Compact (BACnet) (All versions < V3.5.4), APOGEE PXC Compact (P2 Ethernet) (All versions < V2.8.19), APOGEE PXC Modular (BACnet) (All versions < V3.5.4), APOGEE PXC Modular (P2 Ethernet) (All versions < V2.8.19), Desigo PXC00-E.D (All versions >= V2.3 and < V6.30.016), Desigo PXC00-U (All versions >= V2.3 and < V6.30.016), Desigo PXC001-E.D (All versions >= V2.3 and < V6.30.016), Desigo PXC100-E.D (All versions >= V2.3 and < V6.30.016), Desigo PXC12-E.D (All versions >= V2.3 and < V6.30.016), Desigo PXC128-U (All versions >= V2.3 and < V6.30.016), Desigo PXC200-E.D (All versions >= V2.3 and < V6.30.016), Desigo PXC22-E.D (All versions >= V2.3 and < V6.30.016), Desigo PXC22.1-E.D (All versions >= V2.3 and < V6.30.016), Desigo PXC36.1-E.D (All versions >= V2.3 and < V6.30.016), Desigo PXC50-E.D (All versions >= V2.3 and < V6.30.016), Desigo PXC64-U (All versions >= V2.3 and < V6.30.016), Desigo PXM20-E (All versions >= V2.3 and < V6.30.016), Nucleus NET (All versions), Nucleus ReadyStart V3 (All versions < V2017.02.4), Nucleus Source Code (All versions), TALON TC Compact (BACnet) (All versions < V3.5.4), TALON TC Modular (BACnet) (All versions < V3.5.4). FTP server does not properly validate the length of the “MKD/XMKD” command, leading to stack-based buffer overflows. This may result in Denial-of-Service conditions and Remote Code Execution. (FSMD-2021-0018)

Weakness: CWE-787 (Out-of-bounds Write), CWE-170 (Improper Null Termination)

## Which versions are affected by CVE-2021-31888?

It affects 22 products.


Products: Siemens Apogee Modular Building Controller Firmware, Siemens Apogee Modular Equiment Controller Firmware, Siemens Apogee Pxc Compact Firmware, Siemens Apogee Pxc Modular Firmware, Siemens Desigo Pxc00-E.d Firmware, Siemens Desigo Pxc00-U Firmware, Siemens Desigo Pxc001-E.d Firmware, Siemens Desigo Pxc100-E.d Firmware, Siemens Desigo Pxc12-E.d Firmware, Siemens Desigo Pxc128-U Firmware, Siemens Desigo Pxc200-E.d Firmware, Siemens Desigo Pxc22-E.d Firmware, Siemens Desigo Pxc22.1-E.d Firmware, Siemens Desigo Pxc36.1-E.d Firmware, Siemens Desigo Pxc50-E.d Firmware, Siemens Desigo Pxc64-U Firmware, Siemens Desigo Pxm20-E Firmware, Siemens Nucleus Net, Siemens Nucleus Readystart V3, Siemens Nucleus Source Code and 2 more.

## How do I fix CVE-2021-31888?

No fix has been published for CVE-2021-31888 yet. Limit exposure of the affected software until one is available.

## Is CVE-2021-31888 being exploited?

There is no known exploitation of CVE-2021-31888 in the wild and no public exploit code.

## Other vulnerabilities in Siemens APOGEE MBC (PPC) (BACnet)

- [CVE-2021-31884](https://insights.sbomify.com/CVE-2021-31884/): Memory corruption in APOGEE MBC (PPC) (BACnet) (critical 9.8)
- [CVE-2021-31886](https://insights.sbomify.com/CVE-2021-31886/): Memory corruption in APOGEE MBC (PPC) (BACnet) (critical 9.8)
- [CVE-2021-31887](https://insights.sbomify.com/CVE-2021-31887/): Memory corruption in APOGEE MBC (PPC) (BACnet) (high 8.8)
- [CVE-2022-38371](https://insights.sbomify.com/CVE-2022-38371/): Denial of service in APOGEE MBC (PPC) (BACnet) (high 8.7)
- [CVE-2021-31346](https://insights.sbomify.com/CVE-2021-31346/): Denial of service in Capital Embedded AR Classic 431-422 (high 8.2)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2021-31888 and fix it if it is affected.

What it is: CVE-2021-31888 is a high-severity memory corruption vulnerability in Siemens APOGEE MBC (PPC) (BACnet), published on 9 Nov 2021. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2021-31888 in the wild and no public exploit code.

Affected product: Siemens APOGEE MBC (PPC) (BACnet). No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2021-31888/ (Markdown: https://insights.sbomify.com/CVE-2021-31888/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2021-31888
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2021-31888
- OSV: https://osv.dev/vulnerability/CVE-2021-31888

---
From sbomify Insights: https://insights.sbomify.com/CVE-2021-31888/
Summaries are generated and may contain mistakes; the official description above is the record.
