CVE-2022-23598
MEDIUM 6.1CVSS 3.1Cross-site Scripting when rendering error messages in laminas-form
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.
- Published
- 28 Jan 2022
- Last modified
- 17 Jun 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Modified
- Weakness
- CWE-79
- Also known as
- GHSA-jq4p-mq33-w375
- Sources
- NVDJSONOSV GHSA-jq4p-mq33-w375JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 4.3 | AV:N/AC:M/Au:N/C:N/I:P/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | getlaminas | laminas-formcpe:2.3:a:getlaminas:laminas-form:*:*:*:*:*:*:*:* |
< 2.17.1 | 2.17.1 |
| NVD | getlaminas | laminas-formcpe:2.3:a:getlaminas:laminas-form:*:*:*:*:*:*:*:* |
>= 3.0.0, < 3.0.2 | 3.0.2 |
| NVD | getlaminas | laminas-formcpe:2.3:a:getlaminas:laminas-form:3.1.0:*:*:*:*:*:*:* |
= 3.1.0 | |
| NVD | fedoraproject | fedoracpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:* |
= 34 | |
| NVD | fedoraproject | fedoracpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:* |
= 35 | |
| OSV | Packagist | laminas/laminas-form | >= 3.1.0, < 3.1.1 | 3.1.1 |
| OSV | Packagist | laminas/laminas-form | >= 3.0.0, < 3.0.2 | 3.0.2 |
| OSV | Packagist | laminas/laminas-form | < 2.17.1 | 2.17.1 |
References
- https://getlaminas.org/security/advisory/LP-2022-01 · Mitigation, Third Party Advisory, WEB
- https://github.com/laminas/laminas-form/commit/43005a3ec4c2292d4f825273768d9b884acbca37 · Patch, Third Party Advisory, WEB
- https://github.com/laminas/laminas-form/security/advisories/GHSA-jq4p-mq33-w375 · Mitigation, Third Party Advisory, WEB
- https://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://nvd.nist.gov/vuln/detail/CVE-2022-23598 · ADVISORY
- https://github.com/laminas/laminas-form · WEB
- https://github.com/laminas/laminas-form/releases/tag/2.17.1 · WEB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/CFF6WJ5I7PSEBRF6I753WKE2BXFBGQXE · WEB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/SLNABVK26CE4PFL57VLY242FW3QY4CPC · WEB
History
- 25 Nov 2026 20:34 UTC · NVD: first stored (published 28 Jan 2022)
- 25 Nov 2026 20:15 UTC · OSV: first stored (published 28 Jan 2022)