Skip to content

Unauthenticated GitLab SSRF - CI Lint API [CVE-2021-22214] #235

@Prince-Mendiratta

Description

@Prince-Mendiratta

Vulnerability Details
This is based on SSRF due to CVE-2021-22214.
When requests to the internal network for webhooks are enabled, a server-side request forgery (SSRF) vulnerability in GitLab CE/EE affecting all versions starting from 10.5 was possible to exploit for an unauthenticated attacker even on a GitLab instance where registration is limited.

Our team at Astra Security would like to contribute the scan rule for detecting this vulnerability.

Vulnerable GitLab Versions

  • 10.5 - 13.10.5
  • 13.11 - 13.11.5
  • 13.12 - 13.12.2

GitLab Versions the script has been tested on -

  1. latest (14.1.0, at the time of release) -> Not Vulnerable (401 Not Authorized)
  2. 13.11.7 -> Not Vulnerable (401 Not Authorized)
  3. 13.11.2 -> Vulnerable
  4. 12.7.4 -> Vulnerable

Testing
To demonstrate this vulnerability, we have simulated the attack scenario at https://hypejab.herokuapp.com/api/v4/ci/lint . It can be used for testing purposes and an actual Vulnerable GitLab Instance should also respond in a similar manner.

References

The script has been tailored for both, Nashorn and Graal.js engines.

Signed-off by: [email protected]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions