# CVE-2022-34820: Command injection in SIMATIC CP 1242-7 V2

> Attackers can inject commands during authentication to execute arbitrary code with elevated privileges on Siemens SIMATIC communication processors.

- **Severity:** High 8.4 (`CVSS:3.1/AV:A/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H/E:P/RL:O/RC:C`)
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 12 Jul 2022
- **Updated:** 21 Apr 2025
- **Also known as:** GHSA-6j7x-87cm-p532

## What is CVE-2022-34820?

CVE-2022-34820 is a high-severity command injection vulnerability in Siemens SIMATIC CP 1242-7 V2, published on 12 Jul 2022. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

A vulnerability has been identified in SIMATIC CP 1242-7 V2 (All versions < V3.3.46), SIMATIC CP 1243-1 (All versions < V3.3.46), SIMATIC CP 1243-7 LTE EU (All versions < V3.3.46), SIMATIC CP 1243-7 LTE US (All versions < V3.3.46), SIMATIC CP 1243-8 IRC (All versions < V3.3.46), SIMATIC CP 1542SP-1 IRC (All versions >= V2.0 < V2.2.28), SIMATIC CP 1543-1 (All versions < V3.0.22), SIMATIC CP 1543SP-1 (All versions >= V2.0 < V2.2.28), SIPLUS ET 200SP CP 1542SP-1 IRC TX RAIL (All versions >= V2.0 < V2.2.28), SIPLUS ET 200SP CP 1543SP-1 ISEC (All versions >= V2.0 < V2.2.28), SIPLUS ET 200SP CP 1543SP-1 ISEC TX RAIL (All versions >= V2.0 < V2.2.28), SIPLUS NET CP 1242-7 V2 (All versions < V3.3.46), SIPLUS NET CP 1543-1 (All versions < V3.0.22), SIPLUS S7-1200 CP 1243-1 (All versions < V3.3.46), SIPLUS S7-1200 CP 1243-1 RAIL (All versions < V3.3.46). The application does not correctly escape some user provided fields during the authentication process. This could allow an attacker to inject custom commands and execute arbitrary code with elevated privileges.

Weakness: CWE-116 (Improper Encoding or Escaping of Output), CWE-77 (Improper Neutralization of Special Elements used in a Command)

## Which versions are affected by CVE-2022-34820?

It affects 15 products.


Products: Siemens Simatic Cp 1242-7 V2 Firmware, Siemens Simatic Cp 1243-1 Firmware, Siemens Simatic Cp 1243-7 Lte Eu Firmware, Siemens Simatic Cp 1243-7 Lte Us Firmware, Siemens Simatic Cp 1243-8 Irc Firmware, Siemens Simatic Cp 1542sp-1 Irc Firmware, Siemens Simatic Cp 1543-1 Firmware, Siemens Simatic Cp 1543sp-1 Firmware, Siemens Siplus Et 200sp Cp 1542sp-1 Irc Tx Rail Firmware, Siemens Siplus Et 200sp Cp 1543sp-1 Isec Firmware, Siemens Siplus Et 200sp Cp 1543sp-1 Isec Tx Rail Firmware, Siemens Siplus Net Cp 1242-7 V2 Firmware, Siemens Siplus Net Cp 1543-1 Firmware, Siemens Siplus S7-1200 Cp 1243-1 Firmware, Siemens Siplus S7-1200 Cp 1243-1 Rail Firmware.

## How do I fix CVE-2022-34820?

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

## Is CVE-2022-34820 being exploited?

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

## Other vulnerabilities in Siemens SIMATIC CP 1242-7 V2

- [CVE-2022-34819](https://insights.sbomify.com/CVE-2022-34819/): Memory corruption in SIMATIC CP 1242-7 V2 (critical 10.0)
- [CVE-2022-34821](https://insights.sbomify.com/CVE-2022-34821/): Code injection in RUGGEDCOM RM1224 LTE(4G) EU (high 8.8)
- [CVE-2022-43716](https://insights.sbomify.com/CVE-2022-43716/): Use after free in SIMATIC CP 1242-7 V2 (high 7.5)
- [CVE-2022-43767](https://insights.sbomify.com/CVE-2022-43767/): Denial of service in SIMATIC CP 1242-7 V2 (high 7.5)
- [CVE-2022-43768](https://insights.sbomify.com/CVE-2022-43768/): Denial of service in SIMATIC CP 1242-7 V2 (high 7.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2022-34820 and fix it if it is affected.

What it is: CVE-2022-34820 is a high-severity command injection vulnerability in Siemens SIMATIC CP 1242-7 V2, published on 12 Jul 2022. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2022-34820 in the wild and no public exploit code.

Affected product: Siemens SIMATIC CP 1242-7 V2. 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-2022-34820/ (Markdown: https://insights.sbomify.com/CVE-2022-34820/index.md)
```

## Sources

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

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