PrestaShop

Tip

Impara e pratica il hacking AWS:HackTricks Training AWS Red Team Expert (ARTE)
Impara e pratica il hacking GCP: HackTricks Training GCP Red Team Expert (GRTE) Impara e pratica il hacking Azure: HackTricks Training Azure Red Team Expert (AzRTE)

Supporta HackTricks

From XSS to RCE

  • PrestaXSRF: PrestaShop Exploitation Script che eleva XSS a RCE o altre vulnerabilità critiche. Per maggiori informazioni controlla this post. Fornisce supporto per le versioni PrestaShop 8.X.X e 1.7.X.X, e permette di:
  • (RCE) PSUploadModule(); - Upload a custom Module: Caricare un modulo persistente (backdoor) in PrestaShop.

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

Mancata validazione dell’identità nel modulo ps_checkout < 5.0.5 che permette a un attacker non autenticato di switchare la sessione a qualsiasi customer fornendo la loro email.

  • Endpoint (non autenticato): POST /module/ps_checkout/ExpressCheckout.
  • Flow: ExpressCheckout.php accetta JSON controllato dall’attacker, verifica solo orderID, costruisce ExpressCheckoutRequest e chiama ExpressCheckoutAction::execute().
  • Bug di auth: Nelle versioni vulnerabili ExpressCheckoutAction chiama CustomerAuthenticationAction::execute() quando nessun utente è loggato. Quel metodo semplicemente esegue customerExists(<payer_email>) e context->updateCustomer(new Customer($id)), quindi l’esistenza dell’email == login (nessun controllo di password/token).
  • Campo email controllato dall’attacker: order.payer.email_address all’interno del payload JSON è letto da ExpressCheckoutRequest::getPayerEmail().

Exploitation steps

  1. Raccogliere qualsiasi email di customer registrato (l’admin è separato e non è influenzato da questo flusso).
  2. Inviare un POST non autenticato al controller con orderID e l’email della vittima in order.payer.email_address.
  3. Anche se l’endpoint restituisce 500, la risposta includerà cookie per il context del customer vittima (sessione già switchata), permettendo l’accesso a PII o l’acquisto con carte salvate.
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"}}}

Riferimenti

Tip

Impara e pratica il hacking AWS:HackTricks Training AWS Red Team Expert (ARTE)
Impara e pratica il hacking GCP: HackTricks Training GCP Red Team Expert (GRTE) Impara e pratica il hacking Azure: HackTricks Training Azure Red Team Expert (AzRTE)

Supporta HackTricks