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
- 1In Jersey, set jersey.config.server.wadl.disableWadl to true.
- 2In Apache CXF, remove the WADLGenerator provider from the JAX-RS server configuration.
- 3Block /application.wadl and any ?_wadl query at the reverse proxy as a second layer.
Code examples
Jersey: disable WADL generation
public class AppConfig extends ResourceConfig {
public AppConfig() {
packages("com.example.api");
property(ServerProperties.WADL_FEATURE_DISABLE, true);
}
}Nginx: block the WADL endpoints
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.
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 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.