{"id":"CVE-2022-23598","published":"2022-01-28T22:00:16Z","modified":"2025-04-23T19:08:45Z","title":"Reflected XSS vulnerability when rendering error messages in laminas-form","vendor":"laminas","product":"laminas-form","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.1,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01022,"percentile":0.64286,"provenance":"source"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"references":[{"url":"https://github.com/laminas/laminas-form/security/advisories/GHSA-jq4p-mq33-w375","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/laminas/laminas-form/commit/43005a3ec4c2292d4f825273768d9b884acbca37","tags":["x_refsource_MISC"]},{"url":"https://getlaminas.org/security/advisory/LP-2022-01","tags":["x_refsource_MISC"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/SLNABVK26CE4PFL57VLY242FW3QY4CPC/","tags":["vendor-advisory","x_refsource_FEDORA"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CFF6WJ5I7PSEBRF6I753WKE2BXFBGQXE/","tags":["vendor-advisory","x_refsource_FEDORA"]}],"priority":{"score":17.1,"factors":[{"name":"EPSS percentile","points":12.86},{"name":"CVSS severity","points":4.27}]},"vendorSlug":"laminas","affectedVersions":[{"vendor":"laminas","product":"laminas-form","versions":["< 3.1.1"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2025-04-23T14:11:31.706121Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Packagist","package":"laminas/laminas-form","vulnerableRanges":[">=3.1.0, <3.1.1",">=3.0.0, <3.0.2","<2.17.1"],"patched":["3.1.1","3.0.2","2.17.1"],"from":["GHSA-jq4p-mq33-w375"],"provenance":"source"}],"summary":{"text":"A reflected cross-site scripting flaw exists in the formElementErrors() view helper of laminas-form, the package used to validate and display forms, because validation error messages that contain submitted values are not HTML-escaped in versions prior to 3.1.1. An attacker can exploit this over the network without authentication or privileges, but a victim must interact with the crafted link or input, and the attack is possible only where the application renders these error messages without the workaround or the 3.1.1 patch.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:10:00Z"},"euvd":{"id":"EUVD-2022-0630","exploited":false,"provenance":"source"}}