VikRentCar Car Rental Management System <= 1.4.8 - Cross-Site Request Forgery to Remote Code Execution via 'condtext_update_tmpl' AJAX Task
Impact
The VikRentCar Car Rental Management System plugin for WordPress is vulnerable to Cross-Site Request Forgery in all versions up to, and including, 1.4.8. This is due to missing or incorrect nonce validation on the condtext_update_tmpl function. This makes it possible for unauthenticated attackers to write arbitrary PHP code to the plugin's executable template files such as site/helpers/email_tmpl.php, which are later include()d by loadEmailTemplate() and loadPdfTemplate(), achieving remote code execution on the server via a forged request granted they can trick a site administrator into…
Source excerpt · WordfenceSuccessful exploitation additionally requires an action by an administrator — the attacker cannot trigger the vulnerability on their own.
Affected packages
Affected products
Vendor version evidence. Product records are separate from automatic dependency matching.
e4jvikwp · VikRentCar Car Rental Management System
Other versions: unaffected
| Version / range | Source status |
|---|---|
| 0 through 1.4.8 (inclusive) | affected |
Original source description
The VikRentCar Car Rental Management System plugin for WordPress is vulnerable to Cross-Site Request Forgery in all versions up to, and including, 1.4.8. This is due to missing or incorrect nonce validation on the condtext_update_tmpl function. This makes it possible for unauthenticated attackers to write arbitrary PHP code to the plugin's executable template files such as site/helpers/email_tmpl.php, which are later include()d by loadEmailTemplate() and loadPdfTemplate(), achieving remote code execution on the server via a forged request granted they can trick a site administrator into performing an action such as clicking on a link. The injected PHP payload bypasses sanitization because the plugin's own PHP_OPEN/PHP_CLOSE placeholder expansion and cleanPHPSourceCode() logic explicitly reverse both sanitize_text_field filtering and saveHTML() HTML-encoding, restoring a literal <?php...?> payload to live PHP before it is written to disk. Successful exploitation additionally requires an action by an administrator — the attacker cannot trigger the vulnerability on their own.
References
- Security advisory www.wordfence.com/threat-intel/vulnerabilities/id/36f84246-6658-407a-88dd-4b99a784e682
- Source reference plugins.trac.wordpress.org/browser/vikrentcar/tags/1.4.8/admin/controller.php
- Source reference plugins.trac.wordpress.org/browser/vikrentcar/tags/1.4.8/admin/controller.php
- Source reference plugins.trac.wordpress.org/browser/vikrentcar/tags/1.4.8/admin/helpers/conditional_rules.php
- Source reference plugins.trac.wordpress.org/browser/vikrentcar/tags/1.4.8/admin/helpers/conditional_rules.php
- Source reference plugins.trac.wordpress.org/browser/vikrentcar/tags/1.4.8/admin/helpers/conditional_rules.php
- Source reference plugins.trac.wordpress.org/browser/vikrentcar/tags/1.4.8/site/helpers/lib.vikrentcar.php
- Patch plugins.trac.wordpress.org/changeset