Skip to main content
MediumContentOWASP A05:2021CWE-538

How to fix: Configuration file reference detected in links/assets

The page contains an href/src/action link to a configuration filename (config.yaml, config.json, .env, docker-compose) that often indicates server-side configuration files.

Why it matters

References to sensitive configuration may indicate they are exposed at the URL mentioned.

When a page surfaces the names of server-side configuration files, it provides a roadmap for an attacker probing for common misconfiguration paths.

How to fix it

  1. 1Verify that the referenced paths (e.g. /config.yaml, /.env, /docker-compose.yml) return 404 on the public origin.
  2. 2Block access to dotfiles and config files at the reverse proxy (location ~ /\. { deny all; }).
  3. 3Remove in-content references unless they are user-facing documentation.
  4. 4If these are documentation pages, ensure they are noindexed and not advertised in the sitemap.

Code examples

Block config file access via web server

nginx
# Block common config file extensions
location ~* \.(conf|config|cfg|ini|yaml|yml|toml|json)$ {
  deny all;
  return 404;
}
# Ensure web root does not include application config directory

References

Detected automatically by VulnRadar. The check id is config-file-leaked, stable across every scan so you can filter or diff on it.

See every content check

Questions

How severe is Configuration file reference detected in links/assets?
VulnRadar rates this medium severity in the content category. The severity is fixed per check, not scored per site, so the same finding is the same severity on every scan.
Does VulnRadar check for this automatically?
Yes. It runs as part of every scan under the check id config-file-leaked, which stays the same between runs so you can filter, diff, or gate CI on it.
Which standards does Configuration file reference detected in links/assets map to?
It maps to CWE-538. In the OWASP Top 10 it falls under A05:2021.

Missing a check?

The detection set is open. If you know a misconfiguration this does not catch, propose it: the issue template asks for the threat model, how to detect it, the false-positive risk, and a test fixture, which is the same thing a maintainer would have to work out anyway.

Propose a checkHow a check is built

Scan your own site for configuration file reference detected in links/assets

VulnRadar runs this check and hundreds more against a URL in seconds. No agent to install, just paste a URL.

Or scan this site as a demoRead the docs

Configuration file reference detected in links/assets | VulnRadar