Security vulnerability in a Dutch electronics retailer's website

Timeline:

  • 12 August 2020: Problem discovered and first attempt at contact by phone. The responsible contact person is not available, so my contact details are left for him. The impact is unknown to me; I have not investigated what this vulnerability makes possible. Legally that would probably not be allowed, and I also consider it unethical.

  • 13 August 2020: Second attempt at contact, this time by email to the right contact person. The problem is acknowledged, but not fixed as a priority. Unfortunately I receive no reply to a follow-up email with questions and a request to fix the problem right away.

  • 17 August 2020: Consulted an outside person with experience in reporting this kind of security vulnerability.

  • 27 August 2020: The problem is still present on the website.

  • 28 August 2020: The company called to explain the problem and clarify the situation and this blog. They have promised to fix the problem. I said that I had the best intentions in writing this blog and apologised if it had caused any problems. I will not mention the company's name in this blog, so that my intentions cannot be misinterpreted.

Security vulnerability

On 12 August 2020 I was looking for a new laptop for work and my studies. My current one runs a bit hot and is 4.5 years old*. Despite its age it still performs relatively well, apart from some heavy CPU throttling at times. While I was browsing laptops on the shop's website, there was an option to see right away what your old equipment would be worth as a trade-in. That appealed to me, so I decided to click it. Nothing happened, though. As a web developer and curious student I wasn't satisfied with that, so I dived into my browser's developer tools to find out what the button was supposed to do. There I came across 2 URLs whose PHP script names made it clear to me that they weren't standard parts of the e-commerce software the shop uses.

Each of the two scripts had its own function:

  1. Generating a PDF with a valuation of the device a user had chosen, and saving this PDF on the web server.

  2. Sending the previously generated PDF to an email address of choice, such as the customer's.

Part of the problem was already in script 1, though: there was no validation of user input when calling it, so I could have it generate an empty PDF with just some explanatory text, the company's logo and not a single product in the generated price table.

Script 1 didn't return the PDF as a file, however, but the path to the PDF as JSON: the file name on disk, the path to the PDF on the server and the public URL of the PDF, the latter presumably so that users could view it directly in their browser. The path to the PDF on the server was then sent to script 2, together with an email address.

The attentive reader will already have guessed where this is going. Script 2 accepts the full path to a file on disk and an email address to send that file to. There is no validation checking that only the PDFs are read and attached to the email, rather than any other file someone with bad intentions might request.

After verifying my theory by testing whether script 2 would email script 1 to me, I concluded that things were seriously wrong. I immediately called the shop's customer service and told them I had found an urgent vulnerability in their website. The contact person in question wasn't in the office, though, so my contact details were left for him.

The next day, 13 August, I still hadn't heard anything from the shop. So I decided to make the urgency clear to customer service once more via WhatsApp, after which I was given the email address of the responsible contact person.

I immediately sent a high-priority email and fairly quickly received a short, one-line reply: the problem was acknowledged, I was thanked, and the trade-in feature would be removed from the website in the next sprint . In my first email I had offered to talk by phone, so I could explain the problem better and ask about a possible reward (they have no public policy on this) and the possibility of a graduation internship (you miss every shot you don't take).

I asked these questions in a follow-up email and added that I thought it was advisable to remove the insecure code from their website as soon as possible, rather than wait for the end of the next sprint – I have no idea what the exact impact of this vulnerability is, but I find it unwise to leave a reported security problem for the length of an entire sprint (weeks?). Unfortunately I never received a reply to that email.

On 28 August the company called me to explain the problem and how things had gone. They had looked at my report quickly, but unfortunately hadn't reported back to me at the time. The problem was judged not to be serious, so it was saved to be fixed at a later date. I also believe the problem doesn't have a big impact, because a web shop's data is normally not stored in a way the web server can access - of course I haven't tested this and they will have to check it themselves, but again, with the best intentions, I believe the impact is indeed limited. So they didn't just leave the problem, and I withdraw the conclusion I drew in the previous paragraph.

They are going to fix the problem as soon as possible. They are also putting internal processes in place to prevent this kind of problem from happening again in the future, which is a very good move by the company.

They thanked me for the report and were glad to hear that I only had good intentions. I will leave the company's name out of this post, as it is not my intention to give them a bad name.


*Less than a week later it became clear to me that my batteries have swollen and my laptop badly needs replacing. Unfortunately I'm now working on something of a euphemism for a time bomb, so I had no choice but to order a new one before my studies start on 31 August. So, company, if you're reading this, a reward for the report wouldn't go amiss 😉. They have been kind enough to promise me a small reward in the form of a gift card 😊.

The cushions above should be nice flat batteries.

2020-08-27 14:30