Skip to content
Info disclosure Disclosed report Beginner

Showing Up Source Code

A PHP file was publicly accessible and displayed its source code instead of being executed. An attacker could learn that the site runs WordPress and use that information to look for known WordPress vulnerabilities.

kashif Follow

Originally disclosed on HackerOne

  • Disclosed after 12 months

Hello Sir! I have just seen vulnerability in your website: https://blog.udemy.com in this website your website is showing the PHP code of a file named [wordpress-importer.php] link of this file is listed below: https://blog.udemy.com/wp-content/uploads/2010/09/wordpress-importer.php_.txt I have also attached the proof of concept you can see. Solve Your Issue as soon as possible because a hacker can attack your website by knowing that this is WordPress website and he may find vulnerability in the WordPress he can exploit that vulnerability in your website also Waiting For Your Reply.

Attachments

Untitled.png
Untitled.png From the original on HackerOne

The original report as published on HackerOne, by kashif. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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 file was stored with a .txt extension or in a location where the server did not execute PHP, so it was served as plain text.

Impact

An attacker could learn the site uses WordPress and potentially find a known vulnerability to exploit, though the report does not demonstrate an actual exploit.

What the attacker needed

None

The fix

The exposed file should no longer be publicly readable.

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.

Web servers normally run PHP files and send only the output to the browser. Here the server sent the raw PHP code as a text file, so anyone could read it. That reveals the site uses WordPress, which helps an attacker plan further attacks.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More from Udemy

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.