CVE-2024-25108: Pixelfed/pixelfed Pixelfed Doesn't Check OAuth Scopes Vulnerability
CRITICALCVE-2024-25108 is a CRITICAL (CVSS 9.9) pixelfed doesn't check oauth scopes vulnerability (CWE-285: Improper Authorization) affecting Pixelfed/pixelfed libraries in the Packagist ecosystem. The issue involves pixelfed doesn't check oauth scopes in api routes, giving elevated permissions. Remediation is available by upgrading affected packages to version 0.11.11.
CVE-2024-25108 at a Glance
Security Impact
CVSS: 9.9
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:L/A:L).
How to Fix CVE-2024-25108
To remediate this vulnerability, upgrade all affected Pixelfed/pixelfed dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade pixelfed/pixelfed to 0.11.11
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for pixelfed/pixelfed
How to Check if You Are Affected
To determine whether your application is affected by CVE-2024-25108, inspect your project dependencies for Pixelfed/pixelfed:
inspect dependencies for pixelfed/pixelfed
Analyze the terminal output to locate any version of Pixelfed/pixelfed in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.11.11), 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-285: Improper Authorization, where the product does not perform or incorrectly performs an authorization check when an actor attempts to access a resource or perform an action. In Pixelfed/pixelfed, 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
CVE-2024-25108 Affected Pixelfed/pixelfed Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
pixelfed/pixelfed
|
Packagist |
≥ 0.10.4
< 0.11.11
|
0.11.11
|
References
Frequently Asked Questions
What is CVE-2024-25108?
Which Pixelfed/pixelfed versions are affected?
What version fixes CVE-2024-25108?
Is pixelfed/pixelfed affected?
What is the CVSS score of CVE-2024-25108?
What CWE is associated with CVE-2024-25108?
How can I check Packagist dependencies for CVE-2024-25108?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-gccq-h3xj-jgvf",
"modified" : "2024-10-11T21:35:07Z",
"published" : "2024-02-12T15:17:23Z",
"aliases" : [ "CVE-2024-25108" ],
"summary" : "Pixelfed doesn't check OAuth Scopes in API routes, giving elevated permissions",
"details" : "### Summary\n\nWhen processing requests authorization was improperly and insufficiently checked, allowing attackers to access far more functionality than users intended, including to the administrative and moderator functionality of the Pixelfed server.\n\nThis vulnerability affects every version of Pixelfed between `v0.10.4` and `v0.11.9`, inclusive. A proof of concept of this vulnerability exists.\n\n### Details\n\nIn vulnerable versions of Pixelfed (versions before 0.11.11), when the API checked the request for permissions to perform a certain behavior, it did not check that the OAuth Application/Client had granted access to those API endpoints, it only checked if the user was authenticated via an access token, and if the user was the owner of the resource or an admin on the instance.\n\nThis meant that an attacker could request an access token for \"read\" permissions to authenticate you with their application, but the access token that they obtained actually could be used for \"write\" or even administrative actions, and the user who granted access to their account had zero knowledge of this elevated access.\n\n#### Proof of Concept\n\n1. Create an access token either via [2-legged OAuth flow](https://oauth.net/2/grant-types/authorization-code/) for the `read` scope, or create a Personal Access Tokens with the `read` scope.\n2. Using that Access Token, perform a request that would need a particular higher-privilege scope, for instance, following a user or performing an administrative request. (respectively requiring `follow` or `admin:read` and `admin:write` scopes in the patched versions)\n3. Observe that despite your access token having `read` permissions, the follow or administrative request was successful.\n\ne.g., Maybe an attacker collects an access token (which expires in 1 year) wants to do something really nasty to an admin, such as disabling federation on their target's pixelfed server. As long as that server has `instance.enable_cc` configured (defaults to `true`), then the attacker can use the `read` scoped access token and perform the following request:\n\n```\nPOST /api/admin/config/update\nContent-Type: application/json\nAccept: application/json\nAuthorization: Bearer <access token with read scope>\n\n{ \"key\": \"federation.activitypub.enabled\": \"value\": false }\n```\n\nAnd federation of that pixelfed server would be subsequently disabled, as if the administrator had disabled it.\n\n### Impact\n\nThis vulnerability affects every local user of a Pixelfed server, and can potentially affect the servers' ability to federate.\n\nSome user interaction is required to setup the conditions to be able to exercise the vulnerability, but the attacker could conduct this attack time-delayed manner, where user interaction is not actively required, since access tokens in Pixelfed have a 1-year lifetime before they expire, and users' often forget to revoke access tokens for applications that they are no longer using.\n\nThis also means that Access Tokens that may have been leaked from third-party OAuth Application's databases would be usable for a significant amount of time by potential attackers.\n\n### Prior versions\n\nWhilst this vulnerability is listed as `>= 0.10.4`, there is potential that versions before `0.10.4` are also vulnerable to this sort of security bypass, however, given that the code changed significantly between `0.10.3` and `0.10.4` we've been unable to easily assess if these heavily outdated versions are vulnerable or not to this exploit.\n\n### Sponsorship\n\nThe work involved in investigating and remediation of this security vulnerability was provided by [Nivenly Foundation](https://nivenly.org/), for whom we are grateful for their support of the Fediverse and Pixelfed.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:L/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "pixelfed/pixelfed"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.10.4"
}, {
"fixed" : "0.11.11"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/pixelfed/pixelfed/security/advisories/GHSA-gccq-h3xj-jgvf"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-25108"
}, {
"type" : "WEB",
"url" : "https://github.com/pixelfed/pixelfed/commit/7e47d6dccb0393a2e95c42813c562c854882b037"
}, {
"type" : "WEB",
"url" : "https://github.com/pixelfed/pixelfed/commit/fd7f5dbb"
}, {
"type" : "WEB",
"url" : "https://github.com/pixelfed/pixelfed/commit/fd7f5dbba13818f60d1c2b3ab110b499e996aa81"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/pixelfed/pixelfed"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-280", "CWE-285", "CWE-863" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2024-02-12T15:17:23Z",
"nvd_published_at" : "2024-02-12T20:15:08Z"
}
}