Descrizione
sylius/paypal-plugin is a paypal plugin for the Sylius development platform. In affected versions the URL to the payment page done after checkout was created with autoincremented payment id (/pay-with-paypal/{id}) and therefore it was easy to predict. The problem is that the Credit card form has prefilled "credit card holder" field with the Customer's first and last name and hence this can lead to personally identifiable information exposure. Additionally, the mentioned form did not require authentication. The problem has been patched in Sylius/PayPalPlugin 1.2.4 and 1.3.1. If users are unable to update they can override a sylius_paypal_plugin_pay_with_paypal_form route and change its URL parameters to (for example) {orderToken}/{paymentId}, then override the Sylius\PayPalPlugin\Controller\PayWithPayPalFormAction service, to operate on the payment taken from the repository by these 2 values. It would also require usage of custom repository method. Additionally, one could override the @SyliusPayPalPlugin/payWithPaypal.html.twig template, to add contingencies: ['SCA_ALWAYS'] line in hostedFields.submit(...) function call (line 421). It would then have to be handled in the function callback.
Tipo di vulnerabilità
CWE-639
Aggiramento dell’autorizzazione tramite una chiave controllata dall’utente (IDOR)
Il controllo delle autorizzazioni non impedisce a un utente di accedere ai dati o ai record di un altro semplicemente cambiando l’identificativo che li richiama.
Impatto sui sistemi
| Ambito | Impatto |
| Controllo degli accessi |
Aggirare i meccanismi di protezione È possibile aggirare i controlli di accesso su dati o funzioni specifici di un utente. |
| Controllo degli accessi |
Ottenere privilegi o assumere un’altra identità È possibile un’escalation orizzontale dei privilegi: un utente può vedere o modificare le informazioni di un altro. |
| Controllo degli accessi |
Ottenere privilegi o assumere un’altra identità È possibile un’escalation verticale dei privilegi se la chiave controllata dall’utente è in realtà un indicatore del ruolo di amministratore: l’attaccante ottiene così l’accesso amministrativo. |
Come si previene
Architettura e progettazione
Per ogni accesso ai dati, verifica che l’utente abbia i privilegi necessari per accedere al record richiesto.
Architettura e progettazione · Sviluppo
Assicurati che la chiave usata per cercare il record di un utente non possa essere controllata dall’esterno, o che ogni manomissione venga rilevata.
Architettura e progettazione
Usa la cifratura per rendere più difficile indovinare altri valori validi della chiave, oppure associa alla chiave una firma digitale, così che il server possa verificare che non sia stata manomessa.
Tutte le 3.543 CVE di tipo CWE-639, con andamento e prevenzione