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

- Severity: Medium 6.1 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.02%, higher than 62% of CVEs (2026-11-30)
- Published: 2022-01-28T22:00:16.000Z
- Modified: 2026-06-17T04:30:26.860Z
- Also known as: GHSA-jq4p-mq33-w375
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- laminas laminas-form: < 3.1.1
- laminas/laminas-form (Packagist): from 3.1.0 before 3.1.1; from 3.0.0 before 3.0.2; before 2.17.1
- getlaminas laminas-form: before 2.17.1; from 3.0.0 before 3.0.2; 3.1.0
- fedoraproject fedora: 34; 35

## Every score

- GitHub_M: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- GitHub: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- NVD: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- NVD: CVSS:2.0 4.3 Medium `AV:N/AC:M/Au:N/C:N/I:P/A:N`

## References

- <https://github.com/laminas/laminas-form/security/advisories/GHSA-jq4p-mq33-w375> (mitigation, third-party-advisory, web)
- <https://github.com/laminas/laminas-form/commit/43005a3ec4c2292d4f825273768d9b884acbca37> (patch, third-party-advisory, web)
- <https://getlaminas.org/security/advisory/LP-2022-01> (mitigation, third-party-advisory, web)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/SLNABVK26CE4PFL57VLY242FW3QY4CPC/> (vendor-advisory)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CFF6WJ5I7PSEBRF6I753WKE2BXFBGQXE/> (vendor-advisory)
- <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)

## Sources

- CVE List: [CVE-2022-23598](https://www.cve.org/CVERecord?id=CVE-2022-23598), CVE Terms of Use, modified 2025-04-23
- GitHub Advisory Database: [GHSA-jq4p-mq33-w375](https://github.com/advisories/GHSA-jq4p-mq33-w375), CC-BY-4.0, modified 2024-02-19
- NVD: [CVE-2022-23598](https://nvd.nist.gov/vuln/detail/CVE-2022-23598), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2022-23598 · Whole record: https://cve.day/CVE-2022-23598.json · Rebuilt by cve.day 2026-11-25T22:58:09.444Z
