Exposed DB - a new hope?
InfluxDB's JWT authentication used an empty shared secret by default, so anyone who knew a valid username could forge a signed token and log in. The authors used this during a red-team engagement to read internal monitoring data, including server addresses and some customer data.
komodosec.com
Published on komodosec.com
How a failing red-team engagement led us to find a silly zero day.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Impact
The authors could read internal metadata such as server addresses, internal JIRA communication and a little customer data, and map previously unknown systems; the text says the issue should be mitigated now but was not re-tested.
What the attacker needed
Network access to the InfluxDB port; a known valid username; JWT auth enabled with default config
The fix
The vendor says the issue should be mitigated; admins on old versions should update or set a shared secret in the config file.
How it was found
- Find a valid username through the debug requests endpoint.
- Build a JWT for that user, signed with an empty secret and a future expiry.
- Send it in the Authorization Bearer header to authenticate.
- Query data with InfluxQL once logged in.
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 write-up has not been written yet. The Original tab links to the source.
A JSON Web Token (JWT) is a signed piece of text a server accepts as proof of login. The signature is made with a secret key, so if that key is blank, anyone can sign their own token and pretend to be a user. Here the database shipped with a blank key and never told admins to change it.
What is Crypto?
Encryption, signatures, randomness or certificate checks that do not protect what they claim to.