The telemetry URL was assembled from runtime config with no allowed-origin check and no forced HTTPS, and every request carried a bearer token. Point it anywhere you like.
What goes wrong
Two mistakes stacked on top of each other. The destination URL is built straight from config values with no check that the origin is one you actually trust, so anyone who can influence config redirects the request. That could be a compromised settings server, a tampered config file, or a machine-in-the-middle on the config fetch itself. And the scheme isn't pinned, so nothing stops the request going out over plain HTTP.
Now add the third fact: the same request attaches a bearer token. A redirected request delivers that token to an attacker's endpoint. A downgraded request leaks it to every hop on the wire. A bearer token is a password in a header. You would not POST a password to a URL you never validated, and that is exactly what this does on every telemetry flush.
The pattern
void sendTelemetry(Event e) {
String url = config.host + config.path + "/events";
var req = post(url).body(e);
req.header("Authorization", "Bearer " + config.token);
send(req); // host and scheme both come from config
}void sendTelemetry(Event e) {
URI url = URI.create(config.host + config.path + "/events");
require("https".equals(url.getScheme()));
require(ALLOWED_HOSTS.contains(url.getHost()));
var req = post(url).body(e)
.header("Authorization", "Bearer " + token);
send(req);
}Grounding and reachability were confirmed. The exploit-path gate would not conclude without the calling code, so the finding was held and an evidence request was raised instead of being reported as fact.
Why it matters to you
Config is an input like any other. If an attacker can nudge it, an unvalidated destination plus an attached credential is a clean way to exfiltrate that credential, and then everything the credential unlocks. You don't need a memory bug or an injection. You need one setting.
The rule is simple. A credential only goes to a destination you validated on this call, over a transport you pinned. Anything less is trusting your config store with your auth tokens.
Check your own code
- Find every request whose host or base URL comes from config and pin the scheme to HTTPS.
- Allowlist outbound origins for any request that carries a credential.
- Never attach a token to a request whose destination you haven't validated this call.