Skip to main content
LowAPIOWASP A05:2021CWE-540

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

  1. 1Remove the AsyncAPI document from the public build output and from anything the web server maps.
  2. 2Publish it to an internal developer portal or a private schema registry instead.
  3. 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

bash
grep -rl 'asyncapi' dist public build 2>/dev/null

# Exclude spec sources from the published output
echo 'asyncapi.yaml' >> .vercelignore

References

Detected automatically by VulnRadar. The check id is api-asyncapi-document-exposed, stable across every scan so you can filter or diff on it.

See every api check

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.

Propose a checkHow a check is built

Scan your own site for asyncapi document publicly served

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

How to fix: AsyncAPI document publicly served | VulnRadar