# CVE-2022-40267: Authentication Bypass Vulnerability in Web Server Function on MELSEC Series

> Remote attackers can bypass authentication on Mitsubishi MELSEC PLC web servers by predicting weak random numbers, gaining unauthorized access.

- **Severity:** Medium 5.9 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 20 Jan 2023
- **Updated:** 3 Aug 2024
- **Also known as:** GHSA-9vv4-3cf7-mqqr

## What is CVE-2022-40267?

CVE-2022-40267 is a medium-severity authentication bypass vulnerability in Mitsubishi Electric Corporation MELSEC iQ-F Seres FX5U-80MT/ES, published on 20 Jan 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Predictable Seed in Pseudo-Random Number Generator (PRNG) vulnerability in Mitsubishi Electric Corporation MELSEC iQ-F Series FX5U-xMy/z (x=32,64,80, y=T,R, z=ES,DS,ESS,DSS) with serial number 17X**** or later, and versions 1.280 and prior, Mitsubishi Electric Corporation MELSEC iQ-F Series FX5U-xMy/z (x=32,64,80, y=T,R, z=ES,DS,ESS,DSS) with serial number 179**** and prior, and versions 1.074 and prior, Mitsubishi Electric Corporation MELSEC iQ-F Series FX5UC-xMy/z (x=32,64,96, y=T, z=D,DSS)) with serial number 17X**** or later, and versions 1.280 and prior, Mitsubishi Electric Corporation MELSEC iQ-F Series FX5UC-xMy/z (x=32,64,96, y=T, z=D,DSS)) with serial number 179**** and prior, and versions 1.074 and prior, Mitsubishi Electric Corporation MELSEC iQ-F Series FX5UC-32MT/DS-TS versions 1.280 and prior, Mitsubishi Electric Corporation MELSEC iQ-F Series FX5UC-32MT/DSS-TS versions 1.280 and prior, Mitsubishi Electric Corporation MELSEC iQ-F Series FX5UJ-xMy/z (x=24,40,60, y=T,R, z=ES,ESS) versions 1.042 and prior, Mitsubishi Electric Corporation MELSEC iQ-F Series FX5UJ-xMy/ES-A (x=24,40,60, y=T,R) versions 1.043 and prior, Mitsubishi Electric Corporation MELSEC iQ-F Series FX5S-xMy/z (x=30,40,60,80, y=T,R, z=ES,ESS) versions 1.003 and prior, Mitsubishi Electric Corporation MELSEC iQ-F Series FX5UC-32MR/DS-TS versions 1.280 and prior, Mitsubishi Electric Corporation MELSEC iQ-R Series R00/01/02CPU versions 33 and prior, Mitsubishi Electric Corporation MELSEC iQ-R Series R04/08/16/32/120(EN)CPU versions 66 and prior allows a remote unauthenticated attacker to access the Web server function by guessing the random numbers used for authentication from several used random numbers.

Weakness: CWE-335 (Incorrect Usage of Seeds in Pseudo-Random Number Generator (PRNG)), CWE-337 (Predictable Seed in Pseudo-Random Number Generator (PRNG))

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

It affects 53 products.


Products: Mitsubishielectric Fx5s-30mr\/Es Firmware, Mitsubishielectric Fx5s-30mt\/Es Firmware, Mitsubishielectric Fx5s-30mt\/Ess Firmware, Mitsubishielectric Fx5s-40mr\/Es Firmware, Mitsubishielectric Fx5s-40mt\/Es Firmware, Mitsubishielectric Fx5s-40mt\/Ess Firmware, Mitsubishielectric Fx5s-60mr\/Es Firmware, Mitsubishielectric Fx5s-60mt\/Es Firmware, Mitsubishielectric Fx5s-60mt\/Ess Firmware, Mitsubishielectric Fx5s-80mr\/Es Firmware, Mitsubishielectric Fx5s-80mt\/Es Firmware, Mitsubishielectric Fx5s-80mt\/Ess Firmware, Mitsubishielectric Fx5u-32mt\/Dss Firmware, Mitsubishielectric Fx5u-64mt\/Dss Firmware, Mitsubishielectric Fx5u-80mt\/Dss Firmware, Mitsubishielectric Fx5u-80mt\/Ess Firmware, Mitsubishielectric Fx5uc-32mr\/Ds-Ts Firmware, Mitsubishielectric Fx5uc-32mt\/D Firmware, Mitsubishielectric Fx5uc-32mt\/Ds-Ts Firmware, Mitsubishielectric Fx5uc-32mt\/Dss-Ts Firmware and 33 more.

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

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

## Is CVE-2022-40267 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-40267 exists.

## Other vulnerabilities in Mitsubishi Electric Corporation MELSEC iQ-F Seres FX5U-80MT/ES

- [CVE-2023-4625](https://insights.sbomify.com/CVE-2023-4625/): Denial-of-Service（DoS） Vulnerability in Web server function on MELSEC Series CPU module (medium 5.3)

## Fix prompt for AI coding agents

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

What it is: CVE-2022-40267 is a medium-severity authentication bypass vulnerability in Mitsubishi Electric Corporation MELSEC iQ-F Seres FX5U-80MT/ES, published on 20 Jan 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-40267 exists.

Affected product: Mitsubishi Electric Corporation MELSEC iQ-F Seres FX5U-80MT/ES. 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-40267/ (Markdown: https://insights.sbomify.com/CVE-2022-40267/index.md)
```

## Sources

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

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