# CVE-2018-4842: Cross-site scripting in SCALANCE X-200IRT switch family (incl. SIPLUS NET variants)

> Authenticated attackers can inject malicious scripts into the switch's web interface when HRP redundancy is enabled, leading to XSS attacks against visiting users.

- **Severity:** Medium 4.8 (`CVSS:3.0/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** No
- **Published:** 14 Jun 2018
- **Updated:** 5 Aug 2024
- **Also known as:** GHSA-89f2-v4jr-22cm

## What is CVE-2018-4842?

CVE-2018-4842 is a medium-severity cross-site scripting vulnerability in Siemens SCALANCE X-200IRT switch family (incl. SIPLUS NET variants), published on 14 Jun 2018. An attacker needs administrator access to exploit it, and only if a user opens a file or follows a link.

### Official description

A vulnerability has been identified in SCALANCE X-200IRT switch family (incl. SIPLUS NET variants) (All versions < V5.4.1), SCALANCE X-200RNA switch family (All versions < V3.2.7), SCALANCE X-300 switch family (incl. X408 and SIPLUS NET variants) (All versions < V4.1.3). A remote, authenticated attacker with access to the configuration web server could be able to store script code on the web site, if the HRP redundancy option is set. This code could be executed in the web browser of victims visiting this web site (XSS), affecting its confidentiality, integrity and availability. User interaction is required for successful exploitation, as the user needs to visit the manipulated web site. At the stage of publishing this security advisory no public exploitation is known. The vendor has confirmed the vulnerability and provides mitigations to resolve it.

Weakness: CWE-79 (Improper Neutralization of Input During Web Page Generation)

## Which versions are affected by CVE-2018-4842?

It affects 3 products.


Products: Siemens Scalance X200 Firmware, Siemens Scalance X200irt Firmware, Siemens Scalance X300 Firmware.

## How do I fix CVE-2018-4842?

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

## Is CVE-2018-4842 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2018-4842 and fix it if it is affected.

What it is: CVE-2018-4842 is a medium-severity cross-site scripting vulnerability in Siemens SCALANCE X-200IRT switch family (incl. SIPLUS NET variants), published on 14 Jun 2018. An attacker needs administrator access to exploit it, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2018-4842 in the wild and no public exploit code.

Affected product: Siemens SCALANCE X-200IRT switch family (incl. SIPLUS NET variants). 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-2018-4842/ (Markdown: https://insights.sbomify.com/CVE-2018-4842/index.md)
```

## Sources

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

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