LiveActive security incident?Get immediate response
CVE Record

CVE-2022-31138: OS Command Injection in mailcow

mailcow is a mailserver suite. Prior to mailcow-dockerized version 2022-06a, an extended privilege vulnerability can be exploited by manipulating the custom parameters regexmess, skipmess, regexflag, delete2foldersonly, delete2foldersbutnot, regextrans2, pipemess, or maxlinelengthcmd to execute arbitrary code. Users should update their mailcow instances with the `update.sh` script in the mailcow root directory to 2022-06a or newer to receive a patch for this issue. As a temporary workaround, the Syncjob ACL can be removed from all mailbox users, preventing changes to those settings.

HighCVSS 8.8Not KEV-listedUpdated
Glexia's TakeAutomated analysishigh

Security readout for executives and security teams

Plain-English summary

Older mailcow-dockerized installations allowed an authenticated low-privilege user to abuse certain mail filtering or sync settings to run operating system commands. Successful exploitation could give full confidentiality, integrity, and availability impact on the affected mail server.

Executive priority

Treat this as high priority for any affected mail server. The issue can become server-level command execution from a low-privilege account, creating material email confidentiality and operational risk. Patch or remove the risky ACL quickly.

Technical view

CVE-2022-31138 is CWE-78 OS command injection in mailcow-dockerized before 2022-06a. Manipulation of documented custom parameters, including regexmess and pipemess-related settings, could execute arbitrary code. CVSS 3.1 is 8.8 with network access, low complexity, low privileges, and no user interaction.

Likely exposure

Exposure is limited to mailcow-dockerized instances running versions before 2022-06a, especially where mailbox users retain Syncjob ACL permissions that let them change the vulnerable settings.

Exploitation context

The CVE is not in KEV, and the bundle does not prove active exploitation. A public GitHub repository is referenced for this CVE, so defenders should treat exploit knowledge as public while avoiding assumptions about in-the-wild activity.

Researcher notes

The public record identifies affected versions, vulnerable setting names, CVSS, patch release, commit reference, and temporary ACL workaround. It does not provide source-bundle evidence of active exploitation, indicators of compromise, or a complete product exposure matrix.

Mitigation direction

  • Update mailcow-dockerized using update.sh to version 2022-06a or newer.
  • Temporarily remove Syncjob ACL from all mailbox users if immediate updating is not possible.
  • Check mailcow vendor guidance before applying any unsupported configuration workaround.
  • Prioritize internet-facing mail servers and shared mailbox environments first.

Validation and detection

  • Inventory mailcow-dockerized instances and record their installed version.
  • Confirm every instance is running 2022-06a or newer.
  • Review whether mailbox users have Syncjob ACL permissions.
  • Check for unexpected changes to the vulnerable custom parameter settings.
  • Document any unpatched instance and its compensating control status.
Prepared
Confidence
high
Sources
6

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 · medium confidence lookup

CWE-78: Command execution behavior lookup

Command injection weaknesses can lead defenders to review execution techniques and command interpreter telemetry. 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-31138 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
High
CVSS
8.8 (3.1)
Known Exploited
No
Published

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

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
5Source 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
8.8CVSS 3.1HighCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H2.85.9Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

8.8High
CVSS 3.1 vector shape for CVE-2022-31138Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

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

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

Products and packages named in the record

VendorProductVersion / packageStatus
mailcowmailcow-dockerized< 2022-06aListed
Weakness

CWE details

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

CWE-78 · source CWE mapping

Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.