Five Star Restaurant Reservations <= 2.7.16 - Unauthenticated Payment Bypass via PHP Type Juggling in 'payment_id' Parameter
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
- Exploitation: none
- Automatable: yes
- Technical impact: partial
Summary
The Five Star Restaurant Reservations plugin for WordPress is vulnerable to a payment bypass via PHP type juggling in versions up to, and including, 2.7.16 This is due to the valid_payment() function using a PHP loose comparison (==) between the attacker-controlled payment_id POST parameter and the booking's stripe_payment_intent_id property. When an unauthenticated attacker submits a request to the nopriv AJAX handler rtb_stripe_pmt_succeed before the Stripe payment intent has been created for a booking (i.e., before the JavaScript-triggered create_stripe_pmtIntnt() call has stored an intent ID in post meta), the stripe_payment_intent_id property on the booking object remains null. The comparison sanitize_text_field('') == null evaluates to TRUE in PHP loose comparison, causing the payment verification check to pass with zero actual payment. This makes it possible for unauthenticated attackers to mark any existing payment_pending booking as paid without completing a Stripe payment by submitting an empty payment_id parameter.
Timeline
- CVE published
- CISA SSVC assessment
Exploitation: none · Automatable: yes · Technical impact: partial
- Record last updated
Affected versions
- rustaurius Five Star Restaurant Reservations – WordPress Booking Plugin
through 2.7.16
References 7
plugins.trac.wordpress.org
- browser/restaurant-reservations/trunk/includes/PaymentGatewayStripe.class.php#L458
- browser/restaurant-reservations/tags/2.7.13/includes/PaymentGatewayStripe.class.php#L458
- browser/restaurant-reservations/trunk/includes/PaymentGatewayStripe.class.php#L404
- browser/restaurant-reservations/tags/2.7.13/includes/PaymentGatewayStripe.class.php#L404
- changeset/3518833/restaurant-reservations/trunk/includes/PaymentGatewayStripe.class.php
- changeset?old_path=%2Frestaurant-reservations/tags/2.7.16&new_path=%2Frestaurant-reservations/tags/2.7.17