Tainacan <= 1.3.0 - Authenticated (Editor+) Path Traversal to Arbitrary File Read via 'tmp_file' Parameter via Mass Assignment
Impact
The Tainacan plugin for WordPress is vulnerable to Directory Traversal in all versions up to, and including, 1.3.0 via the 'tmp_file' parameter parameter. This makes it possible for authenticated attackers, with editor-level access and above, to read the contents of arbitrary files on the server, which can contain sensitive information. The poisoned importer path is persisted to the database and later triggered via a separate GET request to the /source_info endpoint, which passes the attacker-controlled path to fopen() and fgetcsv() and returns parsed file contents in the REST response.
Source excerpt · WordfenceAffected packages
Affected products
Vendor version evidence. Product records are separate from automatic dependency matching.
tainacan · Tainacan
Other versions: unaffected
| Version / range | Source status |
|---|---|
| 0 through 1.3.0 (inclusive) | affected |
Original source description
The Tainacan plugin for WordPress is vulnerable to Directory Traversal in all versions up to, and including, 1.3.0 via the 'tmp_file' parameter parameter. This makes it possible for authenticated attackers, with editor-level access and above, to read the contents of arbitrary files on the server, which can contain sensitive information. The poisoned importer path is persisted to the database and later triggered via a separate GET request to the /source_info endpoint, which passes the attacker-controlled path to fopen() and fgetcsv() and returns parsed file contents in the REST response.
References
- Security advisory www.wordfence.com/threat-intel/vulnerabilities/id/e16bda6d-0818-468b-9114-82a8f5f68caf
- Source reference plugins.trac.wordpress.org/browser/tainacan/tags/1.3.0/classes/api/endpoints/class-tainacan-rest-importers-controller.php
- Source reference plugins.trac.wordpress.org/browser/tainacan/tags/1.3.0/classes/background-process/importer/class-tainacan-importer.php
- Source reference plugins.trac.wordpress.org/browser/tainacan/tags/1.3.0/classes/background-process/importer/class-tainacan-csv.php
- Source reference plugins.trac.wordpress.org/browser/tainacan/tags/1.3.0/classes/background-process/importer/class-tainacan-csv.php
- Source reference plugins.trac.wordpress.org/browser/tainacan/tags/1.3.0/classes/background-process/importer/class-tainacan-csv.php
- Source reference plugins.trac.wordpress.org/browser/tainacan/tags/1.3.0/classes/api/endpoints/class-tainacan-rest-importers-controller.php
- Source reference plugins.trac.wordpress.org/browser/tainacan/tags/1.3.0/classes/api/endpoints/class-tainacan-rest-importers-controller.php
- Source reference plugins.trac.wordpress.org/browser/tainacan/tags/1.3.0/classes/api/endpoints/class-tainacan-rest-importers-controller.php
- Patch github.com/tainacan/tainacan/commit/1cc2c179d213670ae4bd378473d6fecbc35c6357
- Source reference plugins.trac.wordpress.org/browser/tainacan/tags/1.4.0/classes/api/endpoints/class-tainacan-rest-importers-controller.php