# CVE-2021-25668: Memory corruption in SCALANCE X200-4P IRT

> Incorrect POST request processing in Siemens SCALANCE switches allows heap out-of-bounds writes, enabling remote code execution or denial of service.

- **Severity:** Critical 9.8 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 22 Apr 2021
- **Updated:** 3 Aug 2024
- **Also known as:** GHSA-6c9x-5xpr-57p9

## What is CVE-2021-25668?

CVE-2021-25668 is a critical memory corruption vulnerability in Siemens SCALANCE X200-4P IRT, published on 22 Apr 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

A vulnerability has been identified in SCALANCE X200-4P IRT (All versions < 5.5.1), SCALANCE X201-3P IRT (All versions < 5.5.1), SCALANCE X201-3P IRT PRO (All versions < 5.5.1), SCALANCE X202-2 IRT (All versions < 5.5.1), SCALANCE X202-2P IRT (incl. SIPLUS NET variant) (All versions < 5.5.1), SCALANCE X202-2P IRT PRO (All versions < 5.5.1), SCALANCE X204 IRT (All versions < 5.5.1), SCALANCE X204 IRT PRO (All versions < 5.5.1), SCALANCE X204-2 (incl. SIPLUS NET variant) (All versions < V5.2.5), SCALANCE X204-2FM (All versions < V5.2.5), SCALANCE X204-2LD (incl. SIPLUS NET variant) (All versions < V5.2.5), SCALANCE X204-2LD TS (All versions < V5.2.5), SCALANCE X204-2TS (All versions < V5.2.5), SCALANCE X206-1 (All versions < V5.2.5), SCALANCE X206-1LD (All versions < V5.2.5), SCALANCE X208 (incl. SIPLUS NET variant) (All versions < V5.2.5), SCALANCE X208PRO (All versions < V5.2.5), SCALANCE X212-2 (incl. SIPLUS NET variant) (All versions < V5.2.5), SCALANCE X212-2LD (All versions < V5.2.5), SCALANCE X216 (All versions < V5.2.5), SCALANCE X224 (All versions < V5.2.5), SCALANCE XF201-3P IRT (All versions < 5.5.1), SCALANCE XF202-2P IRT (All versions < 5.5.1), SCALANCE XF204 (All versions < V5.2.5), SCALANCE XF204 IRT (All versions < 5.5.1), SCALANCE XF204-2 (incl. SIPLUS NET variant) (All versions < V5.2.5), SCALANCE XF204-2BA IRT (All versions < 5.5.1), SCALANCE XF206-1 (All versions < V5.2.5), SCALANCE XF208 (All versions < V5.2.5). Incorrect processing of POST requests in the webserver may result in write out of bounds in heap. An attacker might leverage this to cause denial-of-service on the device and potentially remotely execute code.

Weakness: CWE-787 (Out-of-bounds Write), CWE-122 (Heap-based Buffer Overflow)

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

It affects 29 products.


Products: Siemens Scalance X200-4p Irt Firmware, Siemens Scalance X201-3p Irt Firmware, Siemens Scalance X201-3p Irt Pro Firmware, Siemens Scalance X202-2 Irt Firmware, Siemens Scalance X202-2p Irt Firmware, Siemens Scalance X202-2p Irt Pro Firmware, Siemens Scalance X204-2 Firmware, Siemens Scalance X204-2fm Firmware, Siemens Scalance X204-2ld Firmware, Siemens Scalance X204-2ld Ts Firmware, Siemens Scalance X204-2ts Firmware, Siemens Scalance X204 Irt Firmware, Siemens Scalance X204 Irt Pro Firmware, Siemens Scalance X206-1 Firmware, Siemens Scalance X206-1ld Firmware, Siemens Scalance X208 Firmware, Siemens Scalance X208pro Firmware, Siemens Scalance X212-2 Firmware, Siemens Scalance X212-2ld Firmware, Siemens Scalance X216 Firmware and 9 more.

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

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

## Is CVE-2021-25668 being exploited?

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

## Other vulnerabilities in Siemens SCALANCE X200-4P IRT

- [CVE-2021-25669](https://insights.sbomify.com/CVE-2021-25669/): Memory corruption in SCALANCE X200-4P IRT (critical 9.8)
- [CVE-2022-26649](https://insights.sbomify.com/CVE-2022-26649/): Denial of service in SCALANCE X200-4P IRT (critical 9.6)
- [CVE-2022-26647](https://insights.sbomify.com/CVE-2022-26647/): Weak cryptography in SCALANCE X200-4P IRT (high 8.8)
- [CVE-2022-26648](https://insights.sbomify.com/CVE-2022-26648/): Denial of service in SCALANCE X200-4P IRT (high 8.2)
- [CVE-2023-29054](https://insights.sbomify.com/CVE-2023-29054/): Weak cryptography in SCALANCE X200-4P IRT (medium 6.7)

## Fix prompt for AI coding agents

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

What it is: CVE-2021-25668 is a critical memory corruption vulnerability in Siemens SCALANCE X200-4P IRT, published on 22 Apr 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2021-25668 in the wild and no public exploit code.

Affected product: Siemens SCALANCE X200-4P IRT. 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-25668/ (Markdown: https://insights.sbomify.com/CVE-2021-25668/index.md)
```

## Sources

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

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