Skip to content

Conversation

@AltanS
Copy link
Contributor

@AltanS AltanS commented Nov 12, 2025

Plugin directories are often the first point of entry for attackers as they expose README.txt and CHANGELOG.md files to the public. This exposes version information which can be used to identify known vulnerabilities.

I don't think theres any upside in leaving these publicly accessible.


{% block plugin_docs_files -%}
# Block .txt and .md files in plugins and mu-plugins directories to prevent version disclosure
location ~* /plugins/.+\.(txt|md)$ {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we anchor these to /app/plugins? Technically this would block any path containing plugins/foo.txt

@tangrufus
Copy link
Member

Following the same logic, I suggest we block *.md and *txt files under /app/themes as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants