/

CVE-2026-123620

Severity:

HIGH RISK

(7.5)

OS Command Injection (CWE-78) in Usermin Read Mail

CVE-2026-123620

Awaiting Analysis

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Command execution as the Usermin system account

Severity:

HIGH RISK

(7.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Usermin's Read Mail module may pass unsanitized IMAP folder names to an operating-system command. An authenticated user who can create a folder through an external IMAP client and then delete it in Usermin may cause commands to run as the Usermin system account.

Affected context

The issue is described in Usermin through version 2.570 and occurs in the Read Mail module's handling of IMAP folder names during deletion. It becomes risky when a folder name is incorporated into an OS command without adequate neutralization, and a user can create that folder externally and trigger its deletion through Usermin.

Exploit preconditions

  • Attack surface: Usermin's Read Mail module and its folder-deletion handling
  • Required access: An authenticated Usermin account, plus the ability to create an IMAP folder using an external client
  • Trigger point: Deleting the crafted folder through Usermin
  • Why exploitation is possible: Unsanitized folder-name data reaches OS command handling, allowing shell metacharacters to affect command execution

Why this happens

The underlying issue is OS command injection, mapped to CWE-78: Improper Neutralization of Special Elements used in an OS Command. The vulnerable pattern is incorporating externally influenced folder-name data into an operating-system command without safely separating data from command syntax.

Potential impact

  • An attacker may execute commands with the privileges of the Usermin system account.
  • The attacker could access or alter data available to that account.
  • The issue may bypass controls intended to limit users to webmail-only actions.
  • Further compromise could be possible depending on the account's privileges and the surrounding system.

General mitigation guidance

Defensive patterns focus on avoiding shell interpretation of user-controlled values. Prefer APIs that pass arguments directly to a process without invoking a shell, and validate folder names against a narrow, documented format before use. Reduce trust in externally supplied IMAP data, apply least privilege to the service account, and use operating-system and application controls to limit the impact of any command execution.

How teams detect issues like this

  • Use static analysis to identify shell-command construction that includes folder names or other externally influenced values.
  • Review Read Mail code paths for shell invocation, string concatenation, and missing validation or argument separation.
  • Apply code-review and CI policies that prohibit shell execution with untrusted input unless a reviewed safe pattern is used.
  • Monitor for unexpected child processes or command activity initiated by the Usermin service account.

Sources

SourceLink
github.comgithub.com/webmin/usermin
github.comgithub.com/webmin/usermin/blob/2.570/mailbox/mailbox-lib.pl#L1031-L1040
github.comgithub.com/webmin/usermin/commit/8a45420282ff04c943f05d9241a3c55afb9bca79
github.comgithub.com/webmin/usermin/issues/142
hackmd.iohackmd.io/@leediay/H144QKY6zl
vulncheck.comvulncheck.com/advisories/usermin-through-2.570-os-command-injection-via-read-mail-imap-folder-deletion

Frequently asked

questions

The described path requires an authenticated user who can create an IMAP folder through an external client and then delete it in Usermin.

No shell access is described as a prerequisite. The user must be able to perform the folder-creation and deletion actions that reach the vulnerable command-handling path.

Avoid invoking a shell with user-influenced values. Use APIs that pass arguments separately, and validate folder names against a narrowly defined format.

Treat IMAP metadata as untrusted, review command-invocation paths with static analysis and code review, and run services with least privilege.

Find out what's already
exploitable in your codebase.