LiveActive security incident?Get immediate response
CVE Record

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

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.

MediumCVSS 5.4Not KEV-listedUpdated
Glexia's TakeAutomated analysismoderate

Security readout for executives and security teams

Plain-English summary

Affected Nextcloud Server versions can let an authenticated attacker abuse email generation involving iCalendar attachments to inject SMTP commands. Business impact depends on the mail server, but could include unauthorized emails or spoofed sender behavior through Nextcloud’s authenticated SMTP session.

Executive priority

Address in the normal vulnerability remediation cycle, with faster handling for externally exposed or business-critical Nextcloud deployments. The issue is not rated critical, but it affects trusted email-sending paths and could create reputational and phishing risk.

Technical view

The issue is SMTP command injection caused by unsanitized newline handling in iCalendar email attachment flows. CVSS 5.4 reflects network access, low privileges, required user interaction, changed scope, and limited confidentiality and integrity impact. Fixed releases are 22.2.8, 23.0.5, and 24.0.1.

Likely exposure

Exposure is likely limited to Nextcloud Server deployments on versions before 22.2.8, 23.0.5, or 24.0.1 that use backend SMTP. Risk is higher where Nextcloud can send mail through an authenticated SMTP account.

Exploitation context

The source bundle does not show CISA KEV listing or cited evidence of active exploitation. Exploitation requires at least low privileges and user interaction according to the CVSS vector, and the final impact depends on which SMTP commands the backend server accepts.

Researcher notes

Focus validation on version evidence and SMTP configuration. The public summary identifies newline sanitization failure and authenticated SMTP session hijacking risk, but the provided bundle does not include enough detail to assert exploit reliability across SMTP backends.

Mitigation direction

  • Upgrade Nextcloud Server to 22.2.8, 23.0.5, 24.0.1, or later.
  • Treat upgrade as required; the advisory states there are no known workarounds.
  • Prioritize internet-accessible or broadly used Nextcloud instances that send calendar-related email.
  • Review SMTP account activity for unexpected mail, sender changes, or unusual recipients.

Validation and detection

  • Inventory Nextcloud Server versions across production, staging, and managed customer environments.
  • Confirm no instance remains on 22.x before 22.2.8, 23.0.0-23.0.4, or 24.0.0.
  • Verify the patched version is running after maintenance, not only downloaded or staged.
  • Check Nextcloud mail and SMTP logs for unusual outbound email around suspected exposure windows.
Prepared
Confidence
high
Sources
5

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · low confidence lookup

CWE-74: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cwe · low confidence lookup

CWE-93: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
description · low confidence lookup

Execution behavior lookup

The CVE wording references code or command execution, so execution technique review may help defensive triage. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2022-31014 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Medium
CVSS
5.4 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
0Timeline events
0ADP providers
4Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
5.4CVSS 3.1MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N2.32.7Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

5.4Medium
CVSS 3.1 vector shape for CVE-2022-31014Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone

Source materials

Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
nextcloudsecurity-advisories< 22.2.8, >= 23.0.0, < 23.0.5, >= 24.0.0, < 24.0.1Listed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-74 · source CWE mapping

Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')

Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.

CWE-93 · source CWE mapping

Improper Neutralization of CRLF Sequences ('CRLF Injection')

Improper Neutralization of CRLF Sequences ('CRLF Injection') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.