# CVE-2026-56016: CGI::Session::ID::md5 versions before 4.49 for Perl generate predictable session ids from low-entropy sources

> Attackers can predict session IDs due to low-entropy generation, allowing them to impersonate users and bypass authentication in Perl applications.

- **Severity:** Medium 5.9 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 1 Jul 2026
- **Updated:** 1 Jul 2026
- **Also known as:** ALPINE-CVE-2026-56016, DEBIAN-CVE-2026-56016, GHSA-r49c-4q8x-x33v, MGASA-2026-0286, UBUNTU-CVE-2026-56016, openSUSE-SU-2026:11168-1

## What is CVE-2026-56016?

CVE-2026-56016 is a medium-severity vulnerability in MARKSTOS CGI::Session::ID::md5, published on 1 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

CGI::Session::ID::md5 versions before 4.49 for Perl generate predictable session ids from low-entropy sources.

The generate_id method builds the session id from a MD5 digest of the process id, the epoch time, and the built-in rand() function. All three are predictable, low-entropy sources: the PID is drawn from a small range, the epoch time can be guessed or read from the HTTP Date header, and Perl's rand() is unsuitable for security purposes because it is predictable and reversible.

An attacker who predicts a session id can impersonate the corresponding session and bypass authentication.

Weakness: CWE-340 (Generation of Predictable Numbers or Identifiers), CWE-338 (Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG))

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `perl-CGI-Session` | openSUSE:Tumbleweed | All versions | 4.490.0-1.1 |

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

Upgrade to a fixed version.

## Is CVE-2026-56016 being exploited?

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

## Fix prompt for AI coding agents

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

What it is: CVE-2026-56016 is a medium-severity vulnerability in MARKSTOS CGI::Session::ID::md5, published on 1 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-56016 in the wild and no public exploit code.

Affected product: MARKSTOS CGI::Session::ID::md5. 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-2026-56016/ (Markdown: https://insights.sbomify.com/CVE-2026-56016/index.md)
```

## Sources

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

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