/

CVE-2026-19091

Severity:

HIGH RISK

(8.1)

Arbitrary File Deletion (CWE-22) in GeoDirectory Plugin

CVE-2026-19091

Deferred

Vulnerability type

Category:

Path Traversal and Arbitrary File Deletion

CWE:

CWE-22

Impact:

Arbitrary File Deletion with 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

The GeoDirectory WordPress plugin contains an arbitrary file deletion vulnerability caused by insufficient validation of file paths used during revision cleanup. An authenticated attacker with subscriber-level access or higher may delete files outside the intended directory, potentially enabling remote code execution if a security-critical file is removed.

Affected context

The vulnerability occurs in the plugin's revision-deletion workflow when attachment metadata supplies a file path that is later processed without adequate validation. Deployments may be affected when authenticated users can reach the relevant listing or attachment functionality and the server process has permission to remove the targeted files.

Exploit preconditions

  • Attack surface: Authenticated WordPress plugin functionality involving GeoDirectory listings, attachments, and revision deletion
  • Required access: Subscriber-level WordPress access or higher, subject to site-specific authorization controls
  • Trigger point: Processing an attachment or revision through the plugin's delete_revision handler
  • Required state: Attacker-influenced attachment metadata must contain a file path that reaches the deletion logic
  • Why exploitation is possible: The handler dereferences and removes a path without sufficiently enforcing permitted directories, file identity, or expected post-type constraints

Why this happens

The underlying bug is improper validation of a filesystem path before it is used in a destructive file operation. The deletion handler trusts attacker-influenced attachment metadata and does not adequately constrain the resolved path to an approved storage location or verify that the referenced object matches the expected content type. This behavior maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory, because externally influenced path data can escape its intended filesystem boundary.

Potential impact

  • Arbitrary files may be deleted from the WordPress server
  • The WordPress installation may become unavailable or lose configuration data
  • Security-critical application files could be removed
  • The attacker may enable remote code execution under favorable server conditions
  • Website content, uploads, or operational data could be disrupted

General mitigation guidance

Mitigation generally focuses on treating all attachment and metadata paths as untrusted and enforcing a narrow, canonicalized storage boundary before any deletion occurs.

Common defensive patterns include:

  • Resolve and validate paths against an approved upload directory before destructive operations
  • Prefer stored file identifiers or server-generated paths over user-controlled path values
  • Verify object type, ownership, and expected metadata relationships before deletion
  • Reject absolute paths, traversal components, symlink escapes, and unexpected path formats
  • Apply least-privilege permissions to the web server and WordPress process
  • Require authorization checks appropriate to destructive file-management actions
  • Use transactional or reversible cleanup workflows where practical

How teams detect issues like this

Organizations can look for:

  • Static analysis findings where request data, metadata, or database values flow into filesystem deletion functions
  • Code review signals such as direct use of path fields with unlink or equivalent operations
  • Missing canonicalization, directory-boundary checks, object-type validation, or authorization checks
  • Runtime logs showing unexpected deletion targets, access to protected configuration paths, or unusual attachment and revision activity
  • Policy enforcement that requires centralized safe-file abstractions for all plugin file operations
  • Automated security review tools configured to identify path traversal and unsafe filesystem APIs

Frequently asked

questions

It can be exploitable through WordPress-accessible functionality when an attacker has the required authenticated account and the affected plugin workflow is reachable. The precise exposure depends on site configuration and permission controls.

The described issue is reachable by authenticated users with subscriber-level access or higher, although additional application state and plugin behavior may be required.

Ensure every deletion target is server-derived or strictly canonicalized and confined to an approved directory. The application should also verify authorization, ownership, object type, and metadata consistency before deleting a file.

Centralize filesystem operations behind safe APIs, treat metadata and request parameters as untrusted, enforce least privilege, and use code review and automated analysis to detect uncontrolled paths reaching destructive operations.

Find out what's already
exploitable in your codebase.