Generated with the help of an LLM.

Problem/Motivation

https://new.drupal.org/core/scripts/drupal returns the PHP source of core/scripts/drupal to anonymous users. The body starts with #!/usr/bin/env php and includes the 11.4.0 deprecation shim that loads dr. The file is not executed and the request is not denied.

That file is already public in Drupal git, so this URL by itself mainly reveals the installed version and shows that files under core/ are reachable on the new Drupal.org site. The same setup can expose files that are not public if the document root is wrong.

Steps to reproduce

  1. As an anonymous user, open https://new.drupal.org/core/scripts/drupal.
  2. The response is the PHP source, not a 403 or 404.

Proposed resolution

Serve only the public web root. Deny HTTP access to core/, vendor/, and other non-public paths. After the change, the URL above should return 403 or 404.

Remaining tasks

  • Confirm whether other paths outside the public docroot are served the same way.
  • Retest the URL after the fix.

User interface changes

None.

Introduced terminology

None.

API changes

None.

Data model changes

None.

Release notes snippet

None. Site configuration on new.drupal.org, not a core release.

Comments

gerson.analista created an issue. See original summary.

quietone’s picture

Issue tags: -Information disclosure

Just taking a moment to change tags per Issue tags field and Issue tags -- special tags