# CVE-2022-31014: SMTP Command Injection in iCalendar Attachments to emails via newlines in Nextcloud Server

- Severity: Medium 5.4 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:L/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): 2.36%, higher than 84% of CVEs (2026-12-01)
- Public exploit code or proof of concept: 2 links below, marked "exploit"
- Published: 2022-07-05T17:15:12.000Z
- Modified: 2026-06-17T04:44:36.420Z
- Weaknesses: CWE-74, CWE-93
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

Nextcloud server is an open source personal cloud server. Affected versions were found to be vulnerable to SMTP command injection. The impact varies based on which commands are supported by the backend SMTP server. However, the main risk here is that the attacker can then hijack an already-authenticated SMTP session and run arbitrary SMTP commands as the email user, such as sending emails to other users, changing the FROM user, and so on. As before, this depends on the configuration of the server itself, but newlines should be sanitized to mitigate such arbitrary SMTP command injection. It is recommended that the Nextcloud Server is upgraded to 22.2.8 , 23.0.5 or 24.0.1. There are no known workarounds for this issue.

(As written by CVE List.)

## Affected

- nextcloud security-advisories: < 22.2.8; >= 23.0.0, < 23.0.5; >= 24.0.0, < 24.0.1
- nextcloud nextcloud_server: before 19.0.13.7; before 22.2.8; from 20.0.0 before 20.0.14.6; from 21.0.0 before 21.0.9.5; from 23.0.0 before 23.0.5; 24.0.0

## Every score

- GitHub_M: CVSS:3.1 5.4 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N`
- NVD: CVSS:3.1 3.5 Low `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:N`
- NVD: CVSS:2.0 3.5 Low `AV:N/AC:M/Au:S/C:N/I:P/A:N`

## References

- <https://github.com/nextcloud/security-advisories/security/advisories/GHSA-264h-3v4w-6xh2> (exploit, third-party-advisory)
- <https://hackerone.com/reports/1516377> (exploit, issue-tracking, patch, third-party-advisory)
- <https://github.com/nextcloud/server/pull/32428> (issue-tracking, patch, third-party-advisory)

## Sources

- CVE List: [CVE-2022-31014](https://www.cve.org/CVERecord?id=CVE-2022-31014), CVE Terms of Use, modified 2025-04-22
- NVD: [CVE-2022-31014](https://nvd.nist.gov/vuln/detail/CVE-2022-31014), Public domain, modified 2026-06-17

---

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