# CVE-2026-42155: Magento LTS: Weak API Session ID — Predictable MD5 of Time-Derived Inputs

> Attackers can hijack active API sessions by brute-forcing predictable MD5-based session IDs generated from time-derived inputs.

- **Severity:** Critical 9.3 (`CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 15 May 2026
- **Updated:** 15 May 2026
- **Also known as:** GHSA-2cwr-gcf9-pvxr

## What is CVE-2026-42155?

CVE-2026-42155 is a critical vulnerability in OpenMage magento-lts, published on 15 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Magento Long Term Support (LTS) is an unofficial, community-driven project provides an alternative to the Magento Community Edition e-commerce platform with a high level of backward compatibility. Prior to 20.18.0, the XML-RPC / SOAP API session ID is generated using an outdated, time-based construction rather than a Cryptographically Secure Pseudo-Random Number Generator (CSPRNG). All inputs to the MD5 hash are time-derived and non-secure. Because the resulting digest relies entirely on the timestamp and the PHP internal LCG state, the effective entropy is severely constrained. This violates the OWASP ASVS v4 requirement of ≥ 64 bits of entropy (V3.2.2) and NIST SP 800-63B standards. By narrowing the LCG window (via server state leaks or general predictability) and leveraging the lack of API rate-limiting, an attacker can generate a localized pool of candidate MD5 hashes and execute a high-speed online brute-force attack to hijack active API sessions. This vulnerability is fixed in 20.18.0.

Weakness: CWE-338 (Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)), CWE-331 (Insufficient Entropy), CWE-330 (Use of Insufficiently Random Values)

## Which versions are affected by CVE-2026-42155?

2 open source packages ship an affected version, including openmage/magento-lts.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `openmage/magento-lts` | Packagist | All versions | 20.18.0 |
| `openmage/magento-lts` | Packagist | All versions | 20.18.0 |

## How do I fix CVE-2026-42155?

Upgrade openmage/magento-lts to 20.18.0 or later.

## Is CVE-2026-42155 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-42155 and fix it if it is affected.

What it is: CVE-2026-42155 is a critical vulnerability in OpenMage magento-lts, published on 15 May 2026. 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-2026-42155 exists.

Affected packages and fixed versions:
- openmage/magento-lts (Packagist): affected all versions; fixed in 20.18.0
- openmage/magento-lts (Packagist): affected all versions; fixed in 20.18.0

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-2026-42155/ (Markdown: https://insights.sbomify.com/CVE-2026-42155/index.md)
```

## Sources

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

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