How to fix: Postman collection export publicly served
A Postman collection export is served from this URL, identified by its own _postman_id field. Collections carry every request path, body and header the author saved.
Why it matters
A collection is a saved copy of how someone actually called the API: every path, every request body, every header. Collections routinely carry the values used while testing, so the file frequently contains a live bearer token, an API key, or a basic-auth credential in the auth block or in a saved variable, and it always contains internal routes that were never linked publicly.
These usually reach the web root by accident: a developer exports a collection into the repository to share it, and the whole repository ends up in the build output. The immediate question is not whether the file should be there, it is whether anything in it is still valid. Treat every credential and every internal hostname it contains as disclosed.
How to fix it
- 1Remove the file from the served origin and from the repository history if it carried credentials.
- 2Rotate every token, key, and password that appears anywhere in the collection or its environment file.
- 3Share collections through a Postman workspace or a private link rather than a checked-in export.
- 4Add *.postman_collection.json and *.postman_environment.json to .gitignore.
Code examples
Find and exclude collection exports
find . -name '*postman_collection.json' -o -name '*postman_environment.json'
cat >> .gitignore <<'EOF'
*.postman_collection.json
*.postman_environment.json
EOFReferences
Detected automatically by VulnRadar. The check id is api-postman-collection-exposed, stable across every scan so you can filter or diff on it.
More api checks
- LowTRACE method referenced in API response body
- InfoREST endpoint allows DELETE
- LowGraphQL introspection field suggestions
- MediumGraphQL endpoint has no rate-limit headers
- LowOpenAPI server URL leaks internal host
- LowCORS preflight result not cached
- HighBearer token in URL query string
- MediumJSONP callback parameter accepted
Questions
- How severe is Postman collection export publicly served?
- VulnRadar rates this medium severity in the api 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 api-postman-collection-exposed, which stays the same between runs so you can filter, diff, or gate CI on it.
- Which standards does Postman collection export publicly served map to?
- It maps to CWE-540. 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.