Open XenoM0rph97 opened 8 months ago
Thank you for this report. The is intended behavior in that:
influx setup
creates a user, an org and an operator tokeninflux auth ls
and the UIinflux auth ls
tokens, which, if this matches the first org, shows the operator token (as you reported)So, yes, the issue is confirmed. A couple of things:
influx
output accordingly, as was done in Cloud 2 and Serverless (hinted at by the UI info you mentioned)This last issue was identified internally prior to this issue and has recently been scheduled for correction by our Engineering team (cc @davidby-influx). Once done and the raw token is no longer stored internally, this issue is fully remediated since while users would be able to see the operator token, nothing sensitive will be leaked via the UI or the influx
tool.
Thanks for the issue! I'm going to leave this open and we'll update it when we've implemented this best practice.
Thanks for the quick response. I just added a simple PoC script to detect and eventually exploit the vulnerability if the above mentioned conditions are met.
I'll watch this thread for future updates.
Gentle reminder on this. I'd like to have this issue officially disclosed since, with the appropriate configuration, customers would be able to mitigate it. Sharing it will help making sure customers will follow this best practice.
Do you have an ECD for the official fix? I know you probably have a very high workload, but the issue has been present here on Github since Mar 2024, I believe it would be better to disclose the CVE soon.
Summary: A business logic flaw in influxdb allows users who own a valid allAccess token to escalate their privileges at operator level by listing current authorization tokens.
Example Scenario: Attacker might be a user which was gained access by an administrator via an allAccess token only within their organization. This user's permissions will allow full control over the organization but will still prevent him to interact with other orgs.
Impact: This vulnerability would allow a user to obtain unrestricted access to the influxdb instance. A similar condition might fully compromise Confidentiality, Integrity and Availability of data owned by users of different organizations. Additionally, since operator token has administrative permissions, Availability and Integrity of the entire influxdb instance might be compromised.
Prerequisites/Limitations:
Steps to reproduce:
Scenario setup
Exploitation (via CLI):
influx auth ls -t <allAccessToken> | grep write:/orgs
. This will list all current active operator tokens on the influxdb instance.Example
Exploitation (via InfluxClient): PoC Script for influx client
Considerations: This might be an intended behaviour. Although, from the security perspective, a user who was gained limited access to a single entity should never be able to escalate their permissions to interact with other entities. Resulting in a critical business logic flaw.
Potential root cause: allAccess tokens by default have permissions to list all authorizations that are defined in the same Org with no restrictions based on type (custom, allAccess, operator) ->
read:orgs/87d0746948a3b3f5/authorizations
.CVSS Base Score: 9.1
CVSS v3.1 Vector: AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H