CVE-2022-50996
WWW::Form::UrlEncoded::XS versions before 0.28 for Perl write past the end of the Perl argument stack when parse_urlencoded returns many pairs
Description
WWW::Form::UrlEncoded::XS versions before 0.28 for Perl write past the end of the Perl argument stack when parse_urlencoded returns many pairs.
parse_urlencoded returns its result as a list, pushing each decoded key and value onto the argument stack without first extending the stack to fit them. parse_urlencoded_arrayref returns an array reference and is not affected.
A remote client that sends a query string or request body with many pairs to an application parsing it with parse_urlencoded can corrupt memory and crash the process.
Exploitation
EPSS 0.37%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 23.1% of all scored CVEs. Scores of 26 Nov 2026.
Weakness
- CWE-787 Out-of-bounds Write
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
|
WWW-Form-UrlEncoded-XS
package
WWW-Form-UrlEncoded-XS |
affected before 0.28
Other versions: unaffected
|
Is my server affected?
Find the installed version of www-form-urlencoded-xs and compare it with the fixed version of your distribution. Distributions often fix a CVE in their own package version, so the version number of the upstream project can mislead.
Debian, Ubuntu
dpkg -l | grep -i www-form-urlencoded-xs
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2022-50996 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2022-50996RHEL, Rocky, Alma, Fedora
rpm -q www-form-urlencoded-xs
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2022-50996Alpine
apk list --installed | grep -i www-form-urlencoded-xsWith Trivy, on the host and for a container image; it prints the installed and the fixed version when a package is affected:
trivy rootfs --scanners vuln / | grep CVE-2022-50996
trivy image --scanners vuln IMAGE | grep CVE-2022-50996
Patchbrief matches the package lists of your Linux servers and containers every day against the Trivy vulnerability database, which covers the packages of Linux distributions and language packages (npm, PyPI, Go, Maven and others), and sends one digest with the command that fixes each problem. Install the agent.
References
Patches and release notes
- https://github.com/kazeburo/WWW-Form-UrlEncoded-XS/commit/9c14314c51f5745da316286131df49d5a53c0bdc.patch github.com · patch
- https://metacpan.org/release/KAZEBURO/WWW-Form-UrlEncoded-XS-0.28/changes metacpan.org · release notes
Other references
- https://github.com/kazeburo/WWW-Form-UrlEncoded-XS/pull/8 github.com · issue tracking
- https://github.com/kazeburo/WWW-Form-UrlEncoded-XS/issues/6 github.com · issue tracking
Source: the record CVE-2022-50996 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.