Security Advisory

CVE-2022-31802: CODESYS Gateway V2 Partial Password Check

Last updated:
  • CVE-2022-31802

CVE-2022-31802 is an authentication flaw in CODESYS Gateway Server V2 before 2.3.9.38: the gateway compares only part of the password given at login, so a short password that matches the start of the real one is accepted. CERT@VDE scores it 9.8; NVD's Primary score is CVSS v2 7.5. CODESYS fixes it in Gateway Server 2.3.9.38.

Need to know whether your firmware ships an affected version? Get a firmware scan report or contact us.

How severe is CVE-2022-31802?

CVSS base score

7.5

High severity

EPSS score (FIRST)

1.4%

Probability of exploitation in the wild in the next 30 days

CISA KEV catalog

No

Not listed

Published

Vulnerability ID: CVE-2022-31802 · Source: NVD

CVSS v3.1 severity rating scale: None 0.0, Low 0.1 to 3.9, Medium 4.0 to 6.9, High 7.0 to 8.9, Critical 9.0 to 10.0
How a CVSS v3.1 base score maps to a severity rating. Source: FIRST CVSS v3.1 specification, section 5.

Which products and versions does CVE-2022-31802 affect?

ComponentCPEVersion range
CODESYS Gateway Server V2 (also in CODESYS Development System V2 setup)cpe:2.3:a:codesys:gateway:*:*:*:*:*:*:*:*2.0 to before 2.3.9.38 (NVD); all versions before V2.3.9.38 (CODESYS Advisory 2022-13); fixed in Gateway Server 2.3.9.38, Development System setup 2.3.9.69
CODESYS provided by Festo—All versions (FSA-202406 / VDE-2024-059, ICSA-25-182-03); mitigation: enable PLC password protection; no Festo CPE in NVD

What does CVE-2022-31802 mean for affected devices?

The CVE record, assigned by CERT@VDE and published on 2022-06-24, reads: "In CODESYS Gateway Server V2 for versions prior to V2.3.9.38 only a part of the the specified password is been compared to the real CODESYS Gateway password. An attacker may perform authentication by specifying a small password that matches the corresponding part of the longer real CODESYS Gateway password." NVD's only Primary metric is CVSS v2 7.5 (AV:N/AC:L/Au:N/C:P/I:P/A:P); NVD has no CVSS v3 score of its own for this record. CERT@VDE, the CNA, scores CVSS v3.1 9.8 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H), shown at NVD as Secondary. The weakness is CWE-187, partial string comparison. NVD's CPE configuration covers CODESYS Gateway from 2.0 up to, but not including, 2.3.9.38 (NVD, CVE.org record).

What does CODESYS say?

CODESYS Advisory 2022-13 (version 2.0 of 2022-06-23) covers three Gateway Server V2 flaws: this one, CVE-2022-31803 (TCP connection exhaustion) and CVE-2022-31804 (unchecked request sizes that can exhaust memory). The gateway routes online communication between clients such as the CODESYS Development System and CODESYS Control runtimes, and all three can be triggered by an unauthenticated attacker with crafted requests. CODESYS rates the advisory as a whole critical (9.8, the score of CVE-2022-31802) and states that no known public exploits target these flaws. All versions of CODESYS Gateway Server before 2.3.9.38 are affected. CODESYS released Gateway Server 2.3.9.38, which is also part of the CODESYS Development System V2 setup 2.3.9.69, and names no workaround. CODESYS adds a compatibility note: clients that used a short form of the password must log in with the full password after the update. The CODESYS team found this flaw internally.

How does it affect Festo installations?

Festo advisory FSA-202406, published by CERT@VDE as VDE-2024-059 on 2024-12-03 (CSAF), lists the three gateway CVEs for "CODESYS provided by Festo", all versions, with the CERT@VDE scores. CISA republished it verbatim as ICSA-25-182-03. Festo's mitigation for all three is to enable password protection at login where no password is set on the controller, and it warns that the password configuration file is not covered by the default backup and restore of Festo Field Device Tool, so it must be selected by hand. Festo's advisory names no fixed CODESYS version; the fixed gateway comes from CODESYS.

What should asset owners do?

Find every engineering PC and server that runs CODESYS V2 with the Gateway Server, including installations that came with Festo software, and update the gateway to 2.3.9.38 or the Development System to 2.3.9.69. Set a PLC password on each CODESYS V2 controller as Festo advises, and back up the password file manually. Keep the gateway's ports reachable only from the engineering network, behind a firewall, and use a VPN for remote access. The Festo CECC and CPX-CEC guide lists these flaws among Festo's engineering tools, and the CODESYS runtime guide covers CODESYS V2 across vendors. The related V2 password flaws are CVE-2022-31805, passwords sent unprotected, and CVE-2022-31806, no password by default.

CVE-2022-31802 is not in the CISA KEV catalog as of 2026-12-04 (catalog version 2026.12.03, 1,811 entries). FIRST EPSS gives it 0.01354, the 72.5th percentile, in the 2026-12-04 dataset (CISA KEV, FIRST EPSS).

Three signals on every advisory: CVSS says how severe the flaw is, EPSS gives the probability of exploitation in the wild in the next 30 days, and a CISA KEV listing means the flaw has been exploited in the wild
CVSS rates severity, EPSS estimates the likelihood of exploitation, and CISA KEV records exploitation seen in the wild. Source: FIRST EPSS; CISA KEV catalog.

How do the CVSS, EPSS and KEV signals for CVE-2022-31802 compare?

CVE-2022-31802 signals as recorded on this page, last checked .
SignalValue for CVE-2022-31802SourceWhat it tells you
CVSS base score7.5 (High)NVDHow severe the flaw is in its worst case, from 0.0 to 10.0; it says nothing about whether anyone is exploiting it.
EPSS probability1.4%FIRST EPSSThe probability that the CVE is exploited in the wild in the next 30 days.
CISA KEV listingNot listed as of 2026-12-04CISA KEV catalogA listing means CISA has reliable evidence of exploitation in the wild; BOD 22-01 sets a remediation due date for US federal civilian agencies.
Published2022-06-24NVDThe date the CVE record was first published in NVD.

How does the CVE-2022-31802 score change on your network?

A CVSS base score assumes the worst-case exposure. If the vulnerable interface on your device is reachable only from a local segment, or an attacker needs an account first, change those metrics below to see the re-scored base value. The FIRST CVSS v3.1 specification puts deployment-specific scoring in the Environmental metric group, so treat this as a quick what-if, not a replacement score.

Starting vector (the first CVSS v3 vector quoted in this advisory): CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Quoted vector: 9.8 (Critical)

Your re-score: 9.8 (Critical)

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

How to fix this class of issueNo dedicated SoftWSP guide covers this weakness class; the fix is usually the vendor patch or firmware update referenced above. Our related guide explains how to plan and verify it: NIST SP 800-40 Rev. 4: enterprise patch management planning, explained.
From advisory to verified fix in four steps: read the advisory, find the affected component in the firmware SBOM, apply the fixed version or vendor mitigation, then re-scan the image to confirm the vulnerable version is gone
Read the advisory, find the component in your firmware SBOM, apply the fix, then re-scan to confirm it.

How do you check CVE-2022-31802 status from the command line?

These commands re-read the three public signals for CVE-2022-31802 (NVD, FIRST EPSS and the CISA KEV feed) so a build pipeline or a ticket can record the current values. They need curl and jq.

# NVD: CVSS metrics and record status (no API key: at most 5 requests per 30 s)
curl -s "https://services.nvd.nist.gov/rest/json/cves/2.0?cveId=CVE-2022-31802" \
  | jq '.vulnerabilities[0].cve | {vulnStatus, metrics}'

# FIRST EPSS: today's exploitation probability and percentile
curl -s "https://api.first.org/data/v1/epss?cve=CVE-2022-31802" | jq '.data[0]'

# CISA KEV: prints the catalog entry, or nothing if the CVE is not listed
curl -s https://www.cisa.gov/sites/default/files/feeds/known_exploited_vulnerabilities.json \
  | jq --arg id CVE-2022-31802 '.vulnerabilities[] | select(.cveID == $id)'

Which sources back each CVE-2022-31802 claim?

  • NVD (read 2026-12-04): status Modified; published 2022-06-24; NVD Primary CVSS v2 7.5 AV:N/AC:L/Au:N/C:P/I:P/A:P only; CERT@VDE Secondary CVSS v3.1 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H; CWE-187; CPE codesys gateway 2.0 to before 2.3.9.38. — NVD
  • CVE record (checked 2026-12-04): state PUBLISHED, CNA CERTVDE, published 2022-06-24, CVSS v3.1 9.8; product CODESYS Gateway Server V2. — CVE.org
  • CODESYS Advisory 2022-13 V2.0 (2022-06-23): CVE-2022-31802 (CWE-187, 9.8), CVE-2022-31803 (CWE-400, 5.3), CVE-2022-31804 (CWE-789, 7.5); Gateway Server V2 before V2.3.9.38 affected; fixed V2.3.9.38, part of Development System setup V2.3.9.69; no workaround; no known public exploits; credits: 31803/31804 Divya Suvarna (ABB), 31802 internal; compatibility note on short passwords. — CODESYS Advisory 2022-13
  • Festo FSA-202406 / VDE-2024-059 (2024-12-03): CODESYS provided by Festo, all versions; mitigation enable password protection at login; password file not in default FFT backup and restore. — CERT@VDE VDE-2024-059
  • Festo FSA-202406 CSAF: scores 9.8, 5.3, 7.5 for CVE-2022-31802, -31803, -31804. — Festo FSA-202406 CSAF
  • CISA ICSA-25-182-03: verbatim republication of Festo FSA-202406, CVE-2022-31802 to -31804. — CISA ICSA-25-182-03
  • Not in the CISA KEV catalog, catalog version 2026.12.03, 1,811 entries, checked 2026-12-04. — CISA KEV
  • EPSS 0.01354, percentile 0.72542, dataset 2026-12-04, read 2026-12-04. — FIRST EPSS

Is your firmware affected by CVE-2022-31802?

Advisories in the same weakness class as CVE-2022-31802

Sources for CVE-2022-31802

  1. NVD
  2. CODESYS Advisory 2022-13: CODESYS Gateway Server V2
  3. CERT@VDE VDE-2024-059 (Festo FSA-202406): CODESYS Gateway V2 vulnerabilities in CODESYS provided by Festo
  4. Festo CSAF FSA-202406
  5. CISA CSAF: ICSA-25-182-03 FESTO CODESYS
  6. CVE.org record CVE-2022-31802 (CNA: CERT@VDE)
  7. CISA KEV
  8. FIRST EPSS

CVE-2022-31802: frequently asked questions

Which version fixes CVE-2022-31802?

CODESYS Gateway Server 2.3.9.38, also shipped in the CODESYS Development System V2 setup 2.3.9.69, according to CODESYS Advisory 2022-13. Festo's FSA-202406 names no fixed version of its own.

What does Festo recommend?

Festo's FSA-202406 (CISA ICSA-25-182-03) asks owners to enable password protection at login where no password is set on the controller, and to back up the password configuration file by hand, because the default Festo Field Device Tool backup does not include it.

Will existing clients still log in after the update?

Only with the full password. CODESYS notes that clients which used a shortened form of the gateway password must use the complete password after updating to Gateway Server 2.3.9.38.

Is CVE-2022-31802 in the CISA KEV catalog?

No, not as of 2026-12-04 (catalog version 2026.12.03, 1,811 entries). FIRST EPSS rates it 0.01354 (72.5th percentile) in the 2026-12-04 dataset.