User impersonation via ambiguous SSH argument parsing
Published Aug 20, 2021 · Updated Aug 3, 2024
SSH parsing in GitLab CE/EE 13.1 through 13.12.8, 14.0 through 14.0.6, and 14.1 through 14.1.1 allows remote authenticated users to impersonate users. The GitLab Shell parser checks an unanchored key-ID regex before the username regex, so username-key-2 is treated as SSH key ID 2. Exploitation requires configured SSH certificate authentication, a certificate for a crafted username such as key-2, and an existing victim key ID; access is limited to the victim account's SSH permissions.
Summary
What happened
SSH parsing in GitLab CE/EE 13.1 through 13.12.8, 14.0 through 14.0.6, and 14.1 through 14.1.1 allows remote authenticated users to impersonate users. The GitLab Shell parser checks an unanchored key-ID regex before the username regex, so username-key-2 is treated as SSH key ID 2. Exploitation requires configured SSH certificate authentication, a certificate for a crafted username such as key-2, and an existing victim key ID; access is limited to the victim account's SSH permissions.
The record
- CVE
- CVE-2021-22254
- Published
- Aug 20, 2021
- Updated
- Aug 3, 2024
- Vendor
- GitLab
- Product
- GitLab
- Classifications
- CWE-116, T1078, T1021.004
- Attack vector
- network
- Privileges
- authenticated
Timeline
How it unfolded
- Aug 20, 2021CVE publishedPublication date reported by the CVE source.
- Aug 3, 2024Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=>=13.1, <13.12.9
- Affected versionversion=>=14.0, <14.0.7
- Affected versionversion=>=14.1, <14.1.2
What conditions does exploitation require?
What is affected?
Published CVSS scores
CVSS describes severity. EPSS estimates exploitation probability.
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
- SSH certificate username-collision reproductionproof of concept · demonstrated
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo