Skip to content
Info disclosure Disclosed report Beginner

Potential server misconfiguration leads to disclosure of vendor/ directory

The web server exposed the vendor directory, allowing access to dependency metadata and PHPUnit files. An attacker could read installed package versions and potentially exploit known vulnerabilities, though the PHPUnit RCE was patched.

h4ckninja Follow

Originally disclosed on HackerOne

  • Fixed in 7 hours
  • Disclosed after 28 days

Hi,

Apologies for the weakness label, it was the closest I could find for what appears to be a server misconfiguration.

Typically, in MVC frameworks like Slim (which I see you are using here), Symfony, Laravel, etc., the front controller is the only thing exposed, leaving vendor/, logs/, and others outside of document root, inaccessible to web browsers.

However, it appears that here that's not the case, having vendor/ accessible.

PoC

https://www.zomato.com/vendor/composer/installed.json

https://www.zomato.com/vendor/slim/slim/composer.json

https://www.zomato.com/vendor/bin/phpunit

I can see that Slim is used, and various libraries are installed with composer.

Why it's a concern

Recently, phpunit had an RCE vulnerability, that if exposed, would allow users to run arbitrary PHP code. PHPUnit is indeed installed: https://www.zomato.com/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php. However, it appears that you are fortunately running the patched version. Reference: http://phpunit.vulnbusters.com/.

Additional notes

I did try other directories, like the logs/ directory, but it doesn't seem to be exposed. Or at least the common app.log isn't available.

The original report as published on HackerOne, by h4ckninja. 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

Impact

An attacker could read dependency information and potentially exploit known vulnerabilities, but the PHPUnit RCE was patched, limiting immediate risk.

What the attacker needed

None

How it was found

  1. Access the vendor directory via the web server.
  2. View composer installed.json to list dependencies.
  3. View composer.json for specific packages.
  4. Access PHPUnit files, including a script associated with a known vulnerability.

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.

The website's server was set up so that a folder meant to be private, called vendor, could be viewed by anyone. This folder contains information about the software libraries the site uses, which could help an attacker find weaknesses. Fortunately, the specific dangerous flaw in one library was already fixed.

What is Info disclosure?

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

More by h4ckninja

View all

1 more disclosed report, best first.

More from Eternal

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.