CVE-2022-23598
published 2022-01-28CVE-2022-23598: laminas-form is a package for validating and displaying simple and complex forms. When rendering validation error messages via the `formElementErrors()` view…
PriorityP425medium6.1CVSS 3.1
AVNACLPRNUIRSCCLILAN
EPSS
0.99%
59.1th percentile
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
9 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| fedoraproject | fedora | — | — |
| fedoraproject | fedora | — | — |
| getlaminas | laminas-form | < 2.17.1 | 2.17.1 |
| getlaminas | laminas-form | — | — |
| getlaminas | laminas-form | >= 3.0.0 < 3.0.2 | 3.0.2 |
| laminas | laminas-form | < 3.1.1 | 3.1.1 |
| laminas | laminas-form | >= 0 < 2.17.1 | 2.17.1 |
| laminas | laminas-form | >= 3.0.0 < 3.0.2 | 3.0.2 |
| laminas | laminas-form | >= 3.1.0 < 3.1.1 | 3.1.1 |
CVSS provenance
nvdv3.16.1MEDIUMCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
nvdv2.04.3MEDIUMAV:N/AC:M/Au:N/C:N/I:P/A:N
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
GHSA
Cross-site Scripting when rendering error messages in laminas-form
ghsa·2022-01-28
CVE-2022-23598 [MEDIUM] CWE-79 Cross-site Scripting when rendering error messages in laminas-form
Cross-site Scripting when rendering error messages in laminas-form
### Impact
When rendering validation error messages via the `formElementErrors()` view helper shipped with laminas-form, many messages will contain the submitted value. However, in vulnerable versions of laminas-form, the value was not being escaped for HTML contexts, which can potentially lead to a Reflected Cross-Site Scripting (XSS) attack.
### Patches
The following versions were issued to mitigate the vulnerability:
- 2.17.1
- 3.0.2
- 3.1.1
### Workarounds
At the top of a view script where you call the `formElementErrors()` view helper, place the following code:
```php
use Laminas\Form\ElementInterface;
use Laminas\View\PhpRenderer;
$escapeMessages = function (ElementInterface $formOrElement, PhpRenderer $rende
OSV
Cross-site Scripting when rendering error messages in laminas-form
osv·2022-01-28
CVE-2022-23598 [MEDIUM] Cross-site Scripting when rendering error messages in laminas-form
Cross-site Scripting when rendering error messages in laminas-form
### Impact
When rendering validation error messages via the `formElementErrors()` view helper shipped with laminas-form, many messages will contain the submitted value. However, in vulnerable versions of laminas-form, the value was not being escaped for HTML contexts, which can potentially lead to a Reflected Cross-Site Scripting (XSS) attack.
### Patches
The following versions were issued to mitigate the vulnerability:
- 2.17.1
- 3.0.2
- 3.1.1
### Workarounds
At the top of a view script where you call the `formElementErrors()` view helper, place the following code:
```php
use Laminas\Form\ElementInterface;
use Laminas\View\PhpRenderer;
$escapeMessages = function (ElementInterface $formOrElement, PhpRenderer $rende
No detection rules found.
No public exploits indexed.
No writeups or analysis indexed.
https://getlaminas.org/security/advisory/LP-2022-01https://github.com/laminas/laminas-form/commit/43005a3ec4c2292d4f825273768d9b884acbca37https://github.com/laminas/laminas-form/security/advisories/GHSA-jq4p-mq33-w375https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CFF6WJ5I7PSEBRF6I753WKE2BXFBGQXE/https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/SLNABVK26CE4PFL57VLY242FW3QY4CPC/https://getlaminas.org/security/advisory/LP-2022-01https://github.com/laminas/laminas-form/commit/43005a3ec4c2292d4f825273768d9b884acbca37https://github.com/laminas/laminas-form/security/advisories/GHSA-jq4p-mq33-w375https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CFF6WJ5I7PSEBRF6I753WKE2BXFBGQXE/https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/SLNABVK26CE4PFL57VLY242FW3QY4CPC/
2022-01-28
Published