Skip to content
Crypto Advisory Advanced CVE-2022-40267

Mitsubishi Electric Corporation MELSEC iQ-FX5U webserver session identifier generation authentication bypass vulnerability

The webserver's session identifier generator uses a weak linear congruential generator that is reseeded with previously disclosed random values. An unauthenticated attacker can request random data from an endpoint and use it to predict future session identifiers, which may become valid once a legitimate user logs in.

Matt Wiseman Follow

Originally disclosed on Cisco Talos

High 7.1 View original

An authentication bypass vulnerability exists in the webserver session identifier generation functionality of the Mitsubishi Electric Corporation’s MELSEC iQ-F FX5U v1.240. A specially crafted HTTP request can lead to session cookie leak.

Matt Wiseman, on Cisco Talos

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

The random number generator is a linear congruential generator that is reseeded from a global buffer of previously generated values, and those values are disclosed to unauthenticated users through the random-number endpoint.

Impact

An attacker could predict future session identifiers and potentially hijack a legitimate user's authenticated session, though the report only says the predicted values could become valid at some point.

What the attacker needed

Network access to the PLC web server; no authentication needed to query random data; a legitimate user later logs in

The fix

The vendor released a patch, though the text does not describe the technical change.

How it was found

  1. Send an unauthenticated POST request to the random number endpoint asking for 32 bytes of data.
  2. Read the returned DATA value, which is the random output used as a future seed.
  3. Use the known generator algorithm and the disclosed values to compute the next random outputs.
  4. Predict the session identifier that will be issued when a legitimate user logs in.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

A programmable logic controller (PLC) is an industrial computer that runs factory equipment, and this one has a small web server for configuration. The web server makes login session codes using a random number generator that is not truly random: it reuses earlier numbers as seeds for later ones. Because anyone can ask the device for some of those earlier numbers without logging in, an attacker can work out the codes that will be issued to real users later and potentially take over their sessions.

What is Crypto?

Encryption, signatures, randomness or certificate checks that do not protect what they claim to.

More by Matt Wiseman

View all

73 more disclosed reports, best first.

More from Cisco Talos

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cryptographic weaknesses

The lesson behind this report.

Encryption, signatures, randomness or certificate checks that do not protect what they claim to.