Skip to main content
LowAPIOWASP A05:2021CWE-540

How to fix: WADL document publicly served

A WADL (Web Application Description Language) document is served from this URL. Jersey, Apache CXF and other JAX-RS stacks generate one automatically and expose it unless it is explicitly disabled.

Why it matters

The document enumerates every resource path the JAX-RS application registers, the HTTP methods each accepts, and every query, path, header and form parameter with its type. That includes internal management resources that are not linked from anywhere and were never meant to be discovered.

This is almost always unintentional rather than a decision: Jersey serves /application.wadl by default, so the surface appears without anyone adding it. Because the WADL is generated from the live resource classes, it is always accurate and always current, which makes it a better map of the application than any documentation the team wrote by hand.

How to fix it

  1. 1In Jersey, set jersey.config.server.wadl.disableWadl to true.
  2. 2In Apache CXF, remove the WADLGenerator provider from the JAX-RS server configuration.
  3. 3Block /application.wadl and any ?_wadl query at the reverse proxy as a second layer.

Code examples

Jersey: disable WADL generation

Java
public class AppConfig extends ResourceConfig {
  public AppConfig() {
    packages("com.example.api");
    property(ServerProperties.WADL_FEATURE_DISABLE, true);
  }
}

Nginx: block the WADL endpoints

nginx
location ~* (application\.wadl|\?_wadl) {
    return 404;
}

References

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

See every api check

Questions

How severe is WADL 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-wadl-document-exposed, which stays the same between runs so you can filter, diff, or gate CI on it.
Which standards does WADL 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 wadl 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: WADL document publicly served | VulnRadar