/

CVE-2026-120040

Severity:

HIGH RISK

(7.5)

Privilege Escalation (CWE-269) in WordPress Mail Logs

CVE-2026-120040

Deferred

Vulnerability type

Category:

Improper Privilege Management

CWE:

CWE-269

Impact:

Account Takeover and Privilege Escalation

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

The Mail logging & Catcher plugin for WordPress can expose administrator password-reset keys through stored email logs when low-privileged users are allowed to view those logs. An authenticated user with subscriber-level access or higher may use a recovered key to complete the password-reset process and gain administrator privileges.

The Mail logging & Catcher plugin for WordPress can expose administrator password-reset keys through stored email logs when low-privileged users are allowed to view those logs. An authenticated user with subscriber-level access or higher may use a recovered key to complete the password-reset process and gain administrator privileges.

Affected context

The issue occurs in WordPress installations using the Mail logging & Catcher plugin when its default_view_role setting grants log-viewing access to low-privileged users, such as those with the read capability. The risk is reduced when access remains restricted to administrators through a capability such as manage_options, although stored sensitive messages should still be treated as protected data.

The issue occurs in WordPress installations using the Mail logging & Catcher plugin when its default_view_role setting grants log-viewing access to low-privileged users, such as those with the read capability. The risk is reduced when access remains restricted to administrators through a capability such as manage_options, although stored sensitive messages should still be treated as protected data.

Exploit preconditions

  • Attack surface: The plugin's stored email log viewing functionality
  • Required access: An authenticated account with subscriber-level access or higher
  • Configuration requirement: The plugin's default_view_role must permit the account to view logged messages
  • Trigger point: Retrieval of an administrator password-reset message from the email logs
  • Why exploitation is possible: Valid password-reset keys are exposed to users who should not be able to access them, enabling the normal password-reset flow to be applied to an administrator account
  • Attack surface: The plugin's stored email log viewing functionality
  • Required access: An authenticated account with subscriber-level access or higher
  • Configuration requirement: The plugin's default_view_role must permit the account to view logged messages
  • Trigger point: Retrieval of an administrator password-reset message from the email logs
  • Why exploitation is possible: Valid password-reset keys are exposed to users who should not be able to access them, enabling the normal password-reset flow to be applied to an administrator account

Why this happens

The underlying flaw is improper privilege management: access to stored email messages is governed by a role or capability configuration that may be broader than the sensitivity of the data being displayed. Because password-reset messages can contain valid administrator reset keys, exposing them to low-privileged users crosses a security boundary and permits privilege escalation. This behavior maps to CWE-269, where authorization controls fail to enforce the privileges required for a sensitive operation.

The underlying flaw is improper privilege management: access to stored email messages is governed by a role or capability configuration that may be broader than the sensitivity of the data being displayed. Because password-reset messages can contain valid administrator reset keys, exposing them to low-privileged users crosses a security boundary and permits privilege escalation. This behavior maps to CWE-269, where authorization controls fail to enforce the privileges required for a sensitive operation.

Potential impact

  • An attacker may obtain valid administrator password-reset keys
  • An attacker could reset an administrator account password
  • An attacker may gain administrator-level access to the WordPress site
  • Site content, users, plugins, or configuration could be modified
  • The compromise could facilitate further data exposure or persistence
  • An attacker may obtain valid administrator password-reset keys
  • An attacker could reset an administrator account password
  • An attacker may gain administrator-level access to the WordPress site
  • Site content, users, plugins, or configuration could be modified
  • The compromise could facilitate further data exposure or persistence

General mitigation guidance

Mitigation generally focuses on enforcing least privilege for email-log access and treating password-reset messages as highly sensitive data.

Common defensive patterns include:

  • Restricting log viewing to trusted administrators or an explicitly authorized support role
  • Avoiding role settings that expose message contents to broad or low-privileged audiences
  • Applying capability checks server-side for every log access request
  • Reducing retention of messages containing credentials, tokens, or reset links
  • Redacting or excluding sensitive reset content from application logs where feasible
  • Auditing existing roles and capabilities for unintended access
  • Requiring strong authentication and least privilege for administrative accounts

Mitigation generally focuses on enforcing least privilege for email-log access and treating password-reset messages as highly sensitive data.

Common defensive patterns include:

  • Restricting log viewing to trusted administrators or an explicitly authorized support role
  • Avoiding role settings that expose message contents to broad or low-privileged audiences
  • Applying capability checks server-side for every log access request
  • Reducing retention of messages containing credentials, tokens, or reset links
  • Redacting or excluding sensitive reset content from application logs where feasible
  • Auditing existing roles and capabilities for unintended access
  • Requiring strong authentication and least privilege for administrative accounts

How teams detect issues like this

Detection can include:

  • Reviewing the plugin's role and capability configuration for access granted to subscriber-level users
  • Auditing authorization checks around email-log listing and message-detail endpoints
  • Using static analysis to identify sensitive data returned without capability enforcement
  • Searching access logs for low-privileged accounts viewing password-reset messages
  • Monitoring password-reset activity and administrative account changes following log access
  • Enforcing policy checks that prevent credentials, reset tokens, and similar secrets from being stored in broadly accessible logs

Detection can include:

  • Reviewing the plugin's role and capability configuration for access granted to subscriber-level users
  • Auditing authorization checks around email-log listing and message-detail endpoints
  • Using static analysis to identify sensitive data returned without capability enforcement
  • Searching access logs for low-privileged accounts viewing password-reset messages
  • Monitoring password-reset activity and administrative account changes following log access
  • Enforcing policy checks that prevent credentials, reset tokens, and similar secrets from being stored in broadly accessible logs

Sources

SourceLink
github.comgithub.com/JWardee/wp-mail-catcher/releases/tag/v2.3.0
plugins.trac.wordpress.orgplugins.trac.wordpress.org/browser/wp-mail-catcher/tags/2.2.0/src/Bootstrap.php#L101
plugins.trac.wordpress.orgplugins.trac.wordpress.org/browser/wp-mail-catcher/tags/2.2.0/src/Bootstrap.php#L259
plugins.trac.wordpress.orgplugins.trac.wordpress.org/browser/wp-mail-catcher/tags/2.2.0/src/Loggers/WpMail.php#L42
plugins.trac.wordpress.orgplugins.trac.wordpress.org/browser/wp-mail-catcher/tags/2.2.0/src/Views/HtmlMessage.php#L9
plugins.trac.wordpress.orgplugins.trac.wordpress.org/browser/wp-mail-catcher/tags/2.2.0/src/Views/TextMessage.php#L10
wordfence.comwordfence.com/threat-intel/vulnerabilities/id/599e46ed-a71c-41d1-839f-6bb76808a58f?source=cve

Frequently asked

questions

It may be exploitable remotely by an authenticated WordPress user when the plugin configuration permits that user to view stored email logs.

The attacker needs a valid account with subscriber-level access or higher, plus authorization to access the relevant logged messages.

Restrict email-log viewing to trusted administrators or another narrowly scoped role, and enforce capability checks on every access path.

Classify logged data by sensitivity, minimize retention of reset tokens and credentials, review role configurations, and monitor access to sensitive logs and subsequent account changes.

It may be exploitable remotely by an authenticated WordPress user when the plugin configuration permits that user to view stored email logs.

The attacker needs a valid account with subscriber-level access or higher, plus authorization to access the relevant logged messages.

Restrict email-log viewing to trusted administrators or another narrowly scoped role, and enforce capability checks on every access path.

Classify logged data by sensitivity, minimize retention of reset tokens and credentials, review role configurations, and monitor access to sensitive logs and subsequent account changes.

Find out what's already
exploitable in your codebase.