# CVE-2026-120640: CGI versions before 5.00 for Perl allow the POSTDATA, PUTDATA, PATCHDATA and XForms:Model parameters to be set from the query string or form fields.


- **Severity:** Medium 6.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N`)
- **Exploited in the wild:** Not known
- **Fix available:** Yes
- **Published:** 3 Nov 2026
- **Updated:** 9 Nov 2026
- **Also known as:** AZL-112807, DEBIAN-CVE-2026-120640, DHI-7wxi-ae7x-kkfj-fu2e, GHSA-2xpc-hf7c-cgvh, UBUNTU-CVE-2026-120640

## What is CVE-2026-120640?

CVE-2026-120640 is a medium-severity vulnerability in CGI, published on 3 Nov 2026. 

### Official description

CGI versions before 5.00 for Perl allow the POSTDATA, PUTDATA, PATCHDATA and XForms:Model parameters to be set from the query string or form fields.

CGI stores a non-form request body under POSTDATA, PUTDATA or PATCHDATA, and an XForms body under XForms:Model, but also accepts these names from the query string, a form field or a multipart part, so an application cannot tell a client-sent value from the real body.

A cross-site HTML form can post POSTDATA={"admin":true} to an endpoint that reads JSON from param('POSTDATA'), a request forgery that needs no CORS preflight.

Weakness: CWE-352 (Cross-Site Request Forgery)

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

1 open source package ship an affected version, including CGI.


| Package | Ecosystem | PURL | Affected | Fixed in |
| --- | --- | --- | --- | --- |
| `CGI` | cpan | `pkg:cpan/CGI` | All versions | 5.00 |

Status by vendor (upstream, then each distribution release and vendor build):

| Who | Release | Status | Packages | Fixed in |
| --- | --- | --- | --- | --- |
| Red Hat | 8 | deferred | `perl-CGI` |  |
| Red Hat | 9 | deferred | `perl-CGI` |  |
| Red Hat | 10 | deferred | `perl-CGI` |  |
| Red Hat | els/7 | deferred | `perl-CGI` |  |

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

Upgrade CGI to 5.00 or later.

## Is CVE-2026-120640 being exploited?

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

## Fix prompt for AI coding agents

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

What it is: CVE-2026-120640 is a medium-severity vulnerability in CGI, published on 3 Nov 2026. 
Exploitation: There is no known exploitation of CVE-2026-120640 in the wild and no public exploit code.

Affected packages and fixed versions:
- CGI (cpan): affected all versions; fixed in 5.00

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

## Sources

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

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