/

CVE-2026-109221

Severity:

HIGH RISK

(8.1)

Path Traversal (CWE-22) in Groundhogg WordPress Plugin

CVE-2026-109221

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Arbitrary File Deletion and Potential Remote Code Execution

Severity:

HIGH RISK

(8.1)

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

Groundhogg for WordPress contains an arbitrary file deletion vulnerability caused by insufficient validation of file paths in its file-copy functionality. An authenticated user with the plugin-defined import_contacts capability, including the default Sales Representative role, may delete files outside the intended location, potentially enabling remote code execution if a security-sensitive file is removed.

Groundhogg for WordPress contains an arbitrary file deletion vulnerability caused by insufficient validation of file paths in its file-copy functionality. An authenticated user with the plugin-defined import_contacts capability, including the default Sales Representative role, may delete files outside the intended location, potentially enabling remote code execution if a security-sensitive file is removed.

Affected context

The issue occurs in WordPress sites using the Groundhogg CRM, Newsletters, and Marketing Automation plugin when the affected file operation processes attacker-influenced paths without adequately constraining them to an approved directory. Exploitation generally depends on the attacker having an authenticated account with the plugin-defined import_contacts capability, which is granted by default to the custom Sales Representative role.

The issue occurs in WordPress sites using the Groundhogg CRM, Newsletters, and Marketing Automation plugin when the affected file operation processes attacker-influenced paths without adequately constraining them to an approved directory. Exploitation generally depends on the attacker having an authenticated account with the plugin-defined import_contacts capability, which is granted by default to the custom Sales Representative role.

Exploit preconditions

  • Attack surface: The Groundhogg plugin's file import or copy functionality
  • Required access: An authenticated WordPress account with the import_contacts capability or equivalent Sales Representative-level privileges
  • Trigger point: Invocation of the vulnerable copy_file function with a file path that is not safely restricted
  • Why exploitation is possible: Insufficient path validation may allow the operation to target files outside its intended directory, enabling deletion of arbitrary server files
  • Attack surface: The Groundhogg plugin's file import or copy functionality
  • Required access: An authenticated WordPress account with the import_contacts capability or equivalent Sales Representative-level privileges
  • Trigger point: Invocation of the vulnerable copy_file function with a file path that is not safely restricted
  • Why exploitation is possible: Insufficient path validation may allow the operation to target files outside its intended directory, enabling deletion of arbitrary server files

Why this happens

The underlying flaw is inadequate canonicalization and authorization of file paths before a file operation is performed. When user-influenced paths are accepted without reliably enforcing an approved base directory, traversal or alternate path representations may escape the intended location. This behavior maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory, commonly called path traversal.

The underlying flaw is inadequate canonicalization and authorization of file paths before a file operation is performed. When user-influenced paths are accepted without reliably enforcing an approved base directory, traversal or alternate path representations may escape the intended location. This behavior maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory, commonly called path traversal.

Potential impact

  • An attacker may delete arbitrary files accessible to the WordPress process.
  • Site availability may be disrupted if application, media, or configuration files are removed.
  • Deleting a security-sensitive file could cause configuration exposure, service failure, or other unsafe states.
  • Under favorable conditions, arbitrary file deletion may contribute to remote code execution.
  • Compromised sites could be used for data loss, defacement, or further abuse.
  • An attacker may delete arbitrary files accessible to the WordPress process.
  • Site availability may be disrupted if application, media, or configuration files are removed.
  • Deleting a security-sensitive file could cause configuration exposure, service failure, or other unsafe states.
  • Under favorable conditions, arbitrary file deletion may contribute to remote code execution.
  • Compromised sites could be used for data loss, defacement, or further abuse.

General mitigation guidance

Mitigation typically focuses on enforcing a strict trust boundary around all file paths and file operations.

Common defensive patterns include:

  • Canonicalizing paths before authorization and requiring them to remain beneath an approved directory.
  • Rejecting traversal sequences, absolute paths, symbolic-link escapes, and ambiguous path representations.
  • Using server-generated file identifiers or allowlisted filenames instead of accepting raw filesystem paths.
  • Applying capability checks, nonce validation, and least-privilege permissions to file-management actions.
  • Separating uploaded or imported content from executable and configuration locations.
  • Limiting the WordPress process and plugin runtime to the minimum filesystem permissions required.

Mitigation typically focuses on enforcing a strict trust boundary around all file paths and file operations.

Common defensive patterns include:

  • Canonicalizing paths before authorization and requiring them to remain beneath an approved directory.
  • Rejecting traversal sequences, absolute paths, symbolic-link escapes, and ambiguous path representations.
  • Using server-generated file identifiers or allowlisted filenames instead of accepting raw filesystem paths.
  • Applying capability checks, nonce validation, and least-privilege permissions to file-management actions.
  • Separating uploaded or imported content from executable and configuration locations.
  • Limiting the WordPress process and plugin runtime to the minimum filesystem permissions required.

How teams detect issues like this

Organizations commonly detect this class of issue through:

  • Static analysis rules that identify filesystem operations using request parameters or other untrusted path data.
  • Code review checks for missing canonicalization, base-directory enforcement, and symlink handling.
  • Runtime monitoring for unusual deletion activity or access to files outside approved plugin and upload directories.
  • Web application and WordPress audit logs correlating capability use with unexpected file operations.
  • Policy enforcement that blocks privileged file-management actions from low-trust roles and flags traversal-like path input.

Automated security scanners and code review tools can help identify unsafe path handling patterns before deployment.

Organizations commonly detect this class of issue through:

  • Static analysis rules that identify filesystem operations using request parameters or other untrusted path data.
  • Code review checks for missing canonicalization, base-directory enforcement, and symlink handling.
  • Runtime monitoring for unusual deletion activity or access to files outside approved plugin and upload directories.
  • Web application and WordPress audit logs correlating capability use with unexpected file operations.
  • Policy enforcement that blocks privileged file-management actions from low-trust roles and flags traversal-like path input.

Automated security scanners and code review tools can help identify unsafe path handling patterns before deployment.

Sources

SourceLink
github.comgithub.com/groundhoggwp/groundhogg/commit/e319e4a849bfbb07cccfbac8558ad6bf07a7fdc0
plugins.trac.wordpress.orgplugins.trac.wordpress.org/browser/groundhogg/tags/4.9.3/admin/tools/tools-page.php#L575
plugins.trac.wordpress.orgplugins.trac.wordpress.org/browser/groundhogg/tags/4.9.3/admin/tools/tools-page.php#L602
plugins.trac.wordpress.orgplugins.trac.wordpress.org/browser/groundhogg/tags/4.9.3/includes/background/import-contacts.php#L200
plugins.trac.wordpress.orgplugins.trac.wordpress.org/browser/groundhogg/tags/4.9.3/includes/classes/traits/file-box.php#L85
plugins.trac.wordpress.orgplugins.trac.wordpress.org/browser/groundhogg/tags/4.9.3/includes/classes/traits/file-box.php#L94
plugins.trac.wordpress.orgplugins.trac.wordpress.org/browser/groundhogg/tags/4.9.3/includes/functions.php#L2872
plugins.trac.wordpress.orgplugins.trac.wordpress.org/browser/groundhogg/tags/4.9.3/includes/functions.php#L8045
plugins.trac.wordpress.orgplugins.trac.wordpress.org/browser/groundhogg/tags/4.9.3/includes/main-roles.php#L583
plugins.trac.wordpress.orgplugins.trac.wordpress.org/browser/groundhogg/tags/4.9.3/includes/utils/files.php#L323
plugins.trac.wordpress.orgplugins.trac.wordpress.org/changeset/3744461/groundhogg/trunk/includes/classes/traits/file-box.php
wordfence.comwordfence.com/threat-intel/vulnerabilities/id/fb5100ac-cfe6-4e91-9349-6e8efa850147?source=cve

Frequently asked

questions

It can be exploited through WordPress-accessible plugin functionality, but exploitation generally requires an authenticated account with the required plugin capability.

No. The relevant import_contacts capability is required. Groundhogg grants it by default to its custom Sales Representative role, although site-specific role configuration may differ.

Constrain every file operation to a canonical, dedicated directory and use allowlisted identifiers rather than attacker-controlled filesystem paths. File operations should also require appropriate capability and request validation.

Treat all file paths as untrusted input, enforce canonical path and symlink checks, separate writable content from executable or configuration files, and review file-management capabilities under least-privilege policies.

It can be exploited through WordPress-accessible plugin functionality, but exploitation generally requires an authenticated account with the required plugin capability.

No. The relevant import_contacts capability is required. Groundhogg grants it by default to its custom Sales Representative role, although site-specific role configuration may differ.

Constrain every file operation to a canonical, dedicated directory and use allowlisted identifiers rather than attacker-controlled filesystem paths. File operations should also require appropriate capability and request validation.

Treat all file paths as untrusted input, enforce canonical path and symlink checks, separate writable content from executable or configuration files, and review file-management capabilities under least-privilege policies.

Find out what's already
exploitable in your codebase.