How to fix: AsyncAPI document publicly served
An AsyncAPI document is served from this URL, describing the event-driven half of the system. It covers brokers, channels and topics, and the payload schema of every message that flows through them.
Why it matters
The document names the broker hostnames and ports, the exact channel and topic strings, the protocol and security scheme each server expects, and the payload schema of every message. That is the whole internal messaging topology, including queues that no public API ever touches, handed over in one file.
Unlike an OpenAPI document, which usually describes an interface that is meant to be public, an AsyncAPI document normally describes internal plumbing between services. Publishing it on the web origin is almost always accidental, typically a docs build that copied the whole spec directory into the output. Serving it is not itself a break-in, but it removes the reconnaissance step for anyone who reaches the broker another way.
How to fix it
- 1Remove the AsyncAPI document from the public build output and from anything the web server maps.
- 2Publish it to an internal developer portal or a private schema registry instead.
- 3Treat the broker addresses it exposed as known, and confirm those brokers require authentication and are not reachable from the internet.
Code examples
Check what the build is publishing
grep -rl 'asyncapi' dist public build 2>/dev/null
# Exclude spec sources from the published output
echo 'asyncapi.yaml' >> .vercelignoreReferences
Detected automatically by VulnRadar. The check id is api-asyncapi-document-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 AsyncAPI document publicly served?
- VulnRadar rates this low 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-asyncapi-document-exposed, which stays the same between runs so you can filter, diff, or gate CI on it.
- Which standards does AsyncAPI document 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.