Summary
Authenticated local users can delete arbitrary pict-rs media on the local instance.
Details
Lemmy before 1.0 implements changes banners, icons and avatars for instance, communities and users in its API by allowing the requester to specify a new media URL.
The API implements removal of the old image when a new image is provided, but it lacks validation that the user is authorized to delete previously uploaded media, as the URL provided is not necessarily a new image uploaded for this purpose.
This results in the ability to delete arbitrary media from the local pict-rs media storage.
As of Lemmy 1.0, banners, icons, and avatars are no longer accepting arbitrary URLs and instead require users to upload media for a specific purpose. This ensures that all uploads for this purpose generate new identifiers for uploads, which are safe to delete in the future.
Impact
Instances with open/semi-open registrations
Most multi-user Lemmy instances have mechanisms allowing users to sign up by themselves.
This includes instances with fully open registration, as well as instances using the application system.
Even for application-based instances, most of them are still pretty much open to new users due to automatic approvals or approvals after answering a CAPTCHA-like question.
Any instance allowing untrusted users is affected by this, as the only requirement is a local user account.
Instances with closed registration, only trusted users
As this vulnerability does not include any form of authentication bypass and isn't exploitable through federation the impact for these instances is more limited due to the barrier of having to obtain valid user credentials first.
For these instances the CVSS v4 score is 5.3 at CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N.
Summary
Authenticated local users can delete arbitrary pict-rs media on the local instance.
Details
Lemmy before 1.0 implements changes banners, icons and avatars for instance, communities and users in its API by allowing the requester to specify a new media URL.
The API implements removal of the old image when a new image is provided, but it lacks validation that the user is authorized to delete previously uploaded media, as the URL provided is not necessarily a new image uploaded for this purpose.
This results in the ability to delete arbitrary media from the local pict-rs media storage.
As of Lemmy 1.0, banners, icons, and avatars are no longer accepting arbitrary URLs and instead require users to upload media for a specific purpose. This ensures that all uploads for this purpose generate new identifiers for uploads, which are safe to delete in the future.
Impact
Instances with open/semi-open registrations
Most multi-user Lemmy instances have mechanisms allowing users to sign up by themselves.
This includes instances with fully open registration, as well as instances using the application system.
Even for application-based instances, most of them are still pretty much open to new users due to automatic approvals or approvals after answering a CAPTCHA-like question.
Any instance allowing untrusted users is affected by this, as the only requirement is a local user account.
Instances with closed registration, only trusted users
As this vulnerability does not include any form of authentication bypass and isn't exploitable through federation the impact for these instances is more limited due to the barrier of having to obtain valid user credentials first.
For these instances the CVSS v4 score is 5.3 at
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N.