CVE-2024-25108: Pixelfed doesn't check OAuth Scopes in API routes, giving elevated permissions

Published Feb 12, 2024
·
Updated

Summary

When 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.

This vulnerability affects every version of Pixelfed between v0.10.4 and v0.11.9, inclusive. A proof of concept of this vulnerability exists.

Details

In 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.

This 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.

Proof of Concept

1. Create an access token either via 2-legged OAuth flow for the read scope, or create a Personal Access Tokens with the read scope. 2. 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) 3. Observe that despite your access token having read permissions, the follow or administrative request was successful.

e.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.enablecc configured (defaults to true), then the attacker can use the read scoped access token and perform the following request:

POST /api/admin/config/update Content-Type: application/json Accept: application/json Authorization: Bearer <access token with read scope>

{ "key": "federation.activitypub.enabled": "value": false }

And federation of that pixelfed server would be subsequently disabled, as if the administrator had disabled it.

Impact

This vulnerability affects every local user of a Pixelfed server, and can potentially affect the servers' ability to federate.

Some 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.

This 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.

Prior versions

Whilst 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.

Sponsorship

The work involved in investigating and remediation of this security vulnerability was provided by Nivenly Foundation, for whom we are grateful for their support of the Fediverse and Pixelfed.

Other sources

Pixelfed doesn't check OAuth Scopes in API routes, giving elevated permissions

— Packagist

Pixelfed is an open source photo sharing platform. When 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. This vulnerability affects every version of Pixelfed between v0.10.4 and v0.11.9, inclusive. A proof of concept of this vulnerability exists. This vulnerability affects every local user of a Pixelfed server, and can potentially affect the servers' ability to federate. Some 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. This vulnerability has been addressed in version 0.11.11. Users are advised to upgrade. There are no known workarounds for this vulnerability.

— NVD

Affected Software

3 affected componentsFixes available
composer/pixelfed/pixelfed>=0.10.4<0.11.11
0.11.11
pixelfed Pixelfed>=0.10.4<0.11.11
composer/pixelfed/pixelfed>=0.10.4, <0.11.11
0.11.11

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade composer/pixelfed/pixelfed to a version that resolves this vulnerability.

    Fixed in 0.11.11
  2. Upgrade

    Upgrade Pixelfed to a version that resolves this vulnerability.

    Fixed in 0.11.11

Event History

Feb 12, 2024
Advisory Published
via GitHub·03:17 PM
Data Sourced
via GitHub·03:17 PM
DescriptionSeverityWeaknessAffected Software
Data Sourced
via Packagist·03:17 PM
DescriptionSeverityAffected Software
CVE Published
via MITRE·08:05 PM
Data Sourced
via MITRE·08:05 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·08:15 PM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2024-25108?

CVE-2024-25108 is considered to have a high severity due to improper authorization checks that may allow unauthorized access to sensitive functionalities.

2

How do I fix CVE-2024-25108?

To fix CVE-2024-25108, update Pixelfed to version 0.11.11 or later, ensuring proper authorization checks are implemented.

3

What does CVE-2024-25108 affect?

CVE-2024-25108 affects versions of Pixelfed between 0.10.4 and 0.11.11, exposing administrative functions to unauthorized users.

4

What vulnerabilities does CVE-2024-25108 introduce?

CVE-2024-25108 introduces vulnerabilities that can allow attackers unauthorized access to administrative and moderator functionalities on the Pixelfed server.

5

Can I mitigate CVE-2024-25108 without updating?

Mitigating CVE-2024-25108 without updating is not recommended, as the core issue lies in insufficient authorization that requires a code fix.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203