PrestaShop

Tip

Aprende y practica Hacking en AWS:HackTricks Training AWS Red Team Expert (ARTE)
Aprende y practica Hacking en GCP: HackTricks Training GCP Red Team Expert (GRTE) Aprende y practica Hacking en Azure: HackTricks Training Azure Red Team Expert (AzRTE)

Apoya a HackTricks

De XSS a RCE

  • PrestaXSRF: PrestaShop Exploitation Script que eleva XSS to RCE or Others Critical Vulnerabilities. For more info check this post. It provides support for PrestaShop Versions 8.X.X and 1.7.X.X, and allows to:
  • (RCE) PSUploadModule(); - Subir un Módulo personalizado: Sube un módulo persistente (backdoor) a PrestaShop.

ps_checkout ExpressCheckout silent login account takeover (CVE-2025-61922)

Missing identity validation in the ps_checkout module < 5.0.5 lets an unauthenticated attacker switch the session to any customer by supplying their email.

  • Endpoint (unauth): POST /module/ps_checkout/ExpressCheckout.
  • Flow: ExpressCheckout.php acepta JSON del atacante, solo verifica orderID, construye ExpressCheckoutRequest y llama a ExpressCheckoutAction::execute().
  • Auth bug: En versiones vulnerables ExpressCheckoutAction llama a CustomerAuthenticationAction::execute() cuando no hay usuario autenticado. Ese método simplemente hace customerExists(<payer_email>) y context->updateCustomer(new Customer($id)), por lo que la existencia del email == inicio de sesión (sin verificación de contraseña/token).
  • Attacker-controlled email field: order.payer.email_address dentro del payload JSON es leído por ExpressCheckoutRequest::getPayerEmail().

Pasos de explotación

  1. Recopilar cualquier correo electrónico de cliente registrado (el admin es aparte y no se ve afectado por este flujo).
  2. Enviar un POST no autenticado al controlador con orderID más el correo de la víctima en order.payer.email_address.
  3. Incluso si el endpoint devuelve 500, la respuesta incluirá cookies para el contexto del cliente de la víctima (sesión ya cambiada), permitiendo acceso a PII o compras con tarjetas guardadas.
POST /module/ps_checkout/ExpressCheckout HTTP/1.1
Host: `<target>`
Content-Type: application/json
Content-Length: 72

{"orderID":"1","order":{"payer":{"email_address":"victim@example.com"}}}

Referencias

Tip

Aprende y practica Hacking en AWS:HackTricks Training AWS Red Team Expert (ARTE)
Aprende y practica Hacking en GCP: HackTricks Training GCP Red Team Expert (GRTE) Aprende y practica Hacking en Azure: HackTricks Training Azure Red Team Expert (AzRTE)

Apoya a HackTricks