# CVE-2021-40342: Use of default key for encryption

> Attackers can decrypt sensitive data and access managed network elements due to the use of a default encryption key in the DES implementation.

- **Severity:** High 7.1 (`CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 5 Jan 2023
- **Updated:** 10 Apr 2025
- **Also known as:** GHSA-747r-gwxx-f5r5

## What is CVE-2021-40342?

CVE-2021-40342 is a high-severity vulnerability in Hitachi Energy FOXMAN-UN, published on 5 Jan 2023. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

In the DES implementation, the affected product versions use a default key for encryption. Successful exploitation allows an attacker to obtain sensitive information and gain access to the network elements that are managed by the affected products versions.

This issue affects 

  *  FOXMAN-UN product: FOXMAN-UN R16A, FOXMAN-UN R15B, FOXMAN-UN R15A, FOXMAN-UN R14B, FOXMAN-UN R14A, FOXMAN-UN R11B, FOXMAN-UN R11A, FOXMAN-UN R10C, FOXMAN-UN R9C; 
  *  UNEM product: UNEM R16A, UNEM R15B, UNEM R15A, UNEM R14B, UNEM R14A, UNEM R11B, UNEM R11A, UNEM R10C, UNEM R9C.

List of CPEs: 
  *  cpe:2.3:a:hitachienergy:foxman-un:R16A:*:*:*:*:*:*:*
  *  cpe:2.3:a:hitachienergy:foxman-un:R15B:*:*:*:*:*:*:*
  *  cpe:2.3:a:hitachienergy:foxman-un:R15A:*:*:*:*:*:*:*
  *  cpe:2.3:a:hitachienergy:foxman-un:R14B:*:*:*:*:*:*:*
  *  cpe:2.3:a:hitachienergy:foxman-un:R14A:*:*:*:*:*:*:*
  *  cpe:2.3:a:hitachienergy:foxman-un:R11B:*:*:*:*:*:*:*
  *  cpe:2.3:a:hitachienergy:foxman-un:R11A:*:*:*:*:*:*:*
  *  cpe:2.3:a:hitachienergy:foxman-un:R10C:*:*:*:*:*:*:*
  *  cpe:2.3:a:hitachienergy:foxman-un:R9C:*:*:*:*:*:*:*
  *  cpe:2.3:a:hitachienergy:unem:R16A:*:*:*:*:*:*:*
  *  cpe:2.3:a:hitachienergy:unem:R15B:*:*:*:*:*:*:*
  *  cpe:2.3:a:hitachienergy:unem:R15A:*:*:*:*:*:*:*
  *  cpe:2.3:a:hitachienergy:unem:R14B:*:*:*:*:*:*:*
  *  cpe:2.3:a:hitachienergy:unem:R14A:*:*:*:*:*:*:*
  *  cpe:2.3:a:hitachienergy:unem:R11B:*:*:*:*:*:*:*
  *  cpe:2.3:a:hitachienergy:unem:R11A:*:*:*:*:*:*:*
  *  cpe:2.3:a:hitachienergy:unem:R10C:*:*:*:*:*:*:*
  *  cpe:2.3:a:hitachienergy:unem:R9C:*:*:*:*:*:*:*

Weakness: CWE-287 (Improper Authentication), CWE-798 (Use of Hard-coded Credentials)

## Which versions are affected by CVE-2021-40342?

It affects 2 products.


Products: Hitachienergy Foxman-Un, Hitachienergy Unem.

## How do I fix CVE-2021-40342?

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

## Is CVE-2021-40342 being exploited?

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

## Other vulnerabilities in Hitachi Energy FOXMAN-UN

- [CVE-2024-2013](https://insights.sbomify.com/CVE-2024-2013/): Auth bypass in FOXMAN-UN (critical 10.0)
- [CVE-2024-2012](https://insights.sbomify.com/CVE-2024-2012/): Auth bypass in FOXMAN-UN (critical 9.1)
- [CVE-2024-2011](https://insights.sbomify.com/CVE-2024-2011/): Memory corruption in FOXMAN-UN (high 8.6)
- [CVE-2022-3929](https://insights.sbomify.com/CVE-2022-3929/): Communication between the client and server partially using CORBA over TCP/IP (high 8.3)
- [CVE-2024-28020](https://insights.sbomify.com/CVE-2024-28020/): Hardcoded credentials in FOXMAN-UN (high 8.0)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2021-40342 and fix it if it is affected.

What it is: CVE-2021-40342 is a high-severity vulnerability in Hitachi Energy FOXMAN-UN, published on 5 Jan 2023. 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-2021-40342 in the wild and no public exploit code.

Affected product: Hitachi Energy FOXMAN-UN. 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-2021-40342/ (Markdown: https://insights.sbomify.com/CVE-2021-40342/index.md)
```

## Sources

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

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