XXE at ecjobs.starbucks.com.cn/retail/hxpublic_v6/hxdynamicpage6.aspx
The site's image upload accepted file types beyond images, letting an attacker upload HTML and XML files that the server then served or parsed. Because the XML parser allowed doctypes and external entities, the server could be made to fetch an attacker-controlled DTD, exposing server information and enabling further attacks.
- Triaged in 2 days
- Fixed in 24 days
- Paid in 40 days
- Disclosed after 9 months
Summary by the program
johnstone discovered that both ecjobs.starbucks.com.cn/retail/hxpublic_v6/hxdynamicpage6.aspx & ecjobs.starbucks.com.cn/recruitjob/hxpublic_v6/hxdynamicpage6.aspx page and were vulnerable to an XML External Entities (XXE) attack. @johnstone — thank you for reporting this vulnerability and your additional efforts to confirm the resolution.
The report
Description: Hi,guys,when i was visited the jobs of starbucks websites in China(https://ecjobs.starbucks.com.cn), i found a features of uploaded user's photo.Thought the bypass the security restrictions of upload,i can upload html|xhtml|xml|config files etc.The uploaded html file can realize the danger of stored xss,and the uploaded xml file can be parsed by the server,Through tested, the server does not prohibit the use of doctypes, entities, and access to external dtd files.
Steps To Reproduce:
Upload and XXE vulnerability:
- Log in to the user, enter the personal information settings page, click Upload Image
- Intercept https access information through Burp suite
- addd "html;" attributes in the parameter of "allow_file_type_list",or you can delete the params of "allow_file_type_list",then replace the filename's Suffix name ".jpg" to ".html"
- Get the server's response information,visited the uploaded file URL.
https://ecjobs.starbucks.com.cn/retail/tempfiles/temp_uploaded_641dee35-5a62-478e-90d7-f5558a78c60e.html 5. uploaded a malicious xml file to the server,change the parameter of "_hxpage",like
POST /retail/hxpublic_v6/hxdynamicpage6.aspx?_hxpage=tempfiles/temp_uploaded_d4e4c8c5-c4ab-4743-a6fd-c2d779a29734.xml&max_file_size_kb=1024&allow_file_type_list=xml;jpg;jpeg;png;bmp;
or change the "HX_PAGE_NAME" params of xml date by post
POST /retail/hxpublic_v6/hxxmlservice6.aspx HTTP/1.1 HX_PAGE_NAME="tempfiles/temp_uploaded_71cc275c-64fc-40fc-a9cc-52cce5a02858.xml"
post the edited request,the starbucks's server will visit the attacker's server to get the DTD file.
Impact
The vulnerability can let the attacker upload the evil files in the server which will spoof the user,steal the user's cookie and informations.The XXE vulnerability disclose some server's informations ,denial of service attack,maybe will cause NTLMv2 hash attacks through XXE(the starbucks'server environment is iis 7.5+asp.net+windows), which could lead to attackers having full control over the server and the entire inner domain. By the way,if the report isn't considered eligible.please let me close this report myself.Thank you
Attachments




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 upload endpoint trusted a client-supplied allow_file_type_list parameter for validation, and the XML parser on the .aspx pages had external entity and DTD resolution enabled.
Impact
An attacker could upload files that spoof users and steal cookies and information, and the XXE could disclose server information, cause denial of service, and possibly enable NTLMv2 hash attacks that could lead to full control of the server and inner domain.
What the attacker needed
A user account; ability to intercept HTTPS requests
The fix
The report was confirmed resolved by the reporter's follow-up, though the text does not describe the fix itself.
How it was found
- Log in and open the personal information settings page, then click Upload Image.
- Intercept the HTTPS upload request with a proxy.
- Add html to the allow_file_type_list parameter (or remove it) and change the file suffix from .jpg to .html.
- Visit the returned URL of the uploaded file to confirm it is served.
- Upload an XML file and point the _hxpage parameter (or the HX_PAGE_NAME field) at it.
- Send the edited request and observe the server fetching the attacker's DTD file.
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.
When you upload a picture, the site is meant to check it really is a picture. Here it trusted a list of allowed types sent by the browser, so someone could slip in a web page or a data file instead. The data file was then read by the server in a way that let it be told to fetch other files, which can leak information.
What is XXE?
An XML parser resolves entities the attacker defines, reading local files or making the server send requests.