Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2025-12137 Overview
CVE-2025-12137 is an arbitrary file read vulnerability in the Import WP plugin for WordPress, which handles CSV and XML imports and exports. All versions up to and including 2.14.16 accept arbitrary absolute file paths in the plugin's REST API endpoint without proper validation. The flaw resides in the attach_file() function when processing file_local actions, allowing authenticated attackers with administrator-level access to read any file on the server's filesystem via the local_url parameter. Readable targets include WordPress configuration files, system files, and other sensitive content. The vulnerability maps to CWE-73: External Control of File Name or Path.
Critical Impact
Authenticated administrators can read arbitrary files on the WordPress host, including wp-config.php database credentials and operating system files such as /etc/passwd.
Affected Products
- Import WP – Export and Import CSV and XML files plugin for WordPress
- All versions up to and including 2.14.16
- Fixed in version 2.14.17
Discovery Timeline
- 2025-11-01 - CVE-2025-12137 published to NVD
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2025-12137
Vulnerability Analysis
The Import WP plugin exposes a REST API endpoint that triggers local file imports. When a request specifies the file_local action with a local_url parameter, the plugin forwards the value as a $source path into ImporterManager without validating that the path remains within an expected directory such as wp-content/uploads/. The downstream attach_file() and filesystem copy routines then operate on the attacker-chosen absolute path, exposing the contents of that file through the import workflow.
Because the API route only requires administrator-level privileges rather than filesystem access, this breaks the trust boundary between WordPress administration and server-level file access. An administrator who should be limited to CMS data can retrieve PHP source, environment files, SSH keys, or other secrets stored anywhere the PHP process can read.
Root Cause
The root cause is missing path validation in the local file ingestion flow in class/Common/Importer/ImporterManager.php. The plugin trusted a user-supplied absolute path and did not canonicalize it or compare it against an allow-list of base directories. CWE-73 describes this class of issue, where external input directly controls a filesystem path. See the OWASP Path Traversal reference for background on this attack class.
Attack Vector
An authenticated administrator sends a REST API request to the plugin's import endpoint with the file_local action and a local_url parameter set to the target absolute path, for example /var/www/html/wp-config.php or /etc/passwd. The plugin reads the file and makes its contents available through the import pipeline. Exploitation requires valid high-privilege credentials but no user interaction and no additional network pivoting.
$importer = $this->get_importer($id);
Logger::setId($importer->getId());
+ $allowed_bases = apply_filters('iwp/importer/local_file/allowed_directories', [
+ realpath(WP_CONTENT_DIR)
+ ]);
+
+ $source = realpath($source);
+
+ $is_allowed = false;
+ foreach ($allowed_bases as $allowed_base) {
+ if ($allowed_base && strpos($source, $allowed_base) === 0) {
+ $is_allowed = true;
+ break;
+ }
+ }
+
+ if (!$source || !$is_allowed) {
+ return new \WP_Error('IWP_LOCAL_FILE_1', __('Access to this file path is not allowed.', 'jc-importer'));
+ }
+
$allowed_file_types = $this->event_handler->run('importer.allowed_file_types', [$importer->getAllowedFileTypes()]);
$prefix = $this->get_importer_file_prefix($importer);
$result = $this->filesystem->copy_file($source, $allowed_file_types, null, $prefix, $filetype);
Source: GitHub commit 94cc524. The patch resolves $source with realpath() and rejects any path that does not start with an allow-listed base directory, defaulting to WP_CONTENT_DIR.
Detection Methods for CVE-2025-12137
Indicators of Compromise
- REST API requests to the Import WP endpoints referencing file_local with a local_url parameter containing absolute paths outside wp-content/.
- Access patterns targeting sensitive paths such as wp-config.php, /etc/passwd, /proc/self/environ, or .env files via the plugin.
- New Import WP import jobs created by administrator accounts that do not normally perform imports.
Detection Strategies
- Inspect web server access logs for POST requests to /wp-json/ routes exposed by the jc-importer plugin that include local_url values with directory traversal characters or non-standard absolute paths.
- Correlate administrator session activity with Import WP job creation to flag anomalous use of local file imports.
- Enable WordPress debug logging and plugin audit logging to capture attach_file() invocations and their source paths.
Monitoring Recommendations
- Monitor PHP-FPM or Apache error logs for file read attempts on paths that WordPress should not normally access.
- Alert on changes to installed plugin versions and verify Import WP is upgraded to 2.14.17 or later across all sites.
- Track outbound exfiltration of file contents from WordPress hosts following administrator logins.
How to Mitigate CVE-2025-12137
Immediate Actions Required
- Upgrade the Import WP plugin to version 2.14.17 or later on every WordPress site in the environment.
- Audit administrator accounts, remove unused privileged users, and enforce multi-factor authentication for all administrators.
- Rotate secrets stored in wp-config.php, including database credentials and authentication keys, if administrator accounts may have been compromised.
Patch Information
The fix is published in Import WP version 2.14.17. The plugin changeset introduces an allow-list enforced through the new iwp/importer/local_file/allowed_directories filter, which defaults to WP_CONTENT_DIR. See the Wordfence vulnerability report for additional vendor detail.
Workarounds
- Deactivate and remove the Import WP plugin until the upgrade can be completed.
- Restrict access to wp-admin and the WordPress REST API by source IP for administrators who perform imports.
- Run PHP under a least-privilege system user that cannot read sensitive files such as /etc/shadow or SSH private keys outside the web root.
# Verify installed Import WP version and update via WP-CLI
wp plugin get jc-importer --field=version
wp plugin update jc-importer --version=2.14.17
# Optional: tighten the allow-list via mu-plugin filter
# Place in wp-content/mu-plugins/iwp-allowlist.php
# <?php
# add_filter('iwp/importer/local_file/allowed_directories', function() {
# return [ realpath(WP_CONTENT_DIR . '/uploads/iwp-imports') ];
# });
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

