Vulnerability · Published Jan 28, 2022 · Assigned by GitHub_M

CVE-2022-23598Reflected XSS vulnerability when rendering error messages in laminas-form

Medium 6.1

In plain English

A medium-severity cross-site scripting in laminas-form from laminas. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 1.0% (higher than 63% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)6.1Medium
Exploit odds (30 days)1.0%top 37.3% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

laminas-form is a package for validating and displaying simple and complex forms. When rendering validation error messages via the `formElementErrors()` view helper shipped with laminas-form, many messages will contain the submitted value. However, in laminas-form prior to version 3.1.1, the value was not being escaped for HTML contexts, which could potentially lead to a reflected cross-site scripting attack. Versions 3.1.1 and above contain a patch to mitigate the vulnerability. A workaround is available. One may manually place code at the top of a view script where one calls the `formElementErrors()` view helper. More information about this workaround is available on the GitHub Security Advisory.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Packagistlaminas/laminas-form3.1.1GHSA-jq4p-mq33-w375
Packagistlaminas/laminas-form3.0.2GHSA-jq4p-mq33-w375
Packagistlaminas/laminas-form2.17.1GHSA-jq4p-mq33-w375

Affected products (as reported)

VendorProductVersions
laminas laminas-form < 3.1.1

Weakness: CWE-79 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

References