backpack/crud
Affected
- introduced
5.0.0, fixed5.0.13(ecosystem)
Fixed versions
5.0.13
Fix
The export has no generic command for this ecosystem.
Advisory
Also known as: CVE-2022-31114
backpack/crud is vulnerable to Cross-Site Scripting (XSS)
Impact
It’s a “*moderate*” vulnerability… but being an admin panel, take this seriously. It’s difficult… but an attacker could conduct a targeted phishing campaign, in order to trick your users or admins to click a malicious link, which under very specific circumstances could give them information... or even admin access. It’s *unlikely*, but that’s not good enough in admin panels - It should be made *impossible*. That’s why you are bothered with this.
Patches
If you don’t have custom error views, the views provided by Backpack would output the exception message *without escaping it*, which made an attack possible using Reflected XSS, in some very specific circumstances (that we will not disclose). To fix those error views in Backpack 4.x and 5.x, please run:
composer update backpack/crud
php artisan backpack:fix
The problem has been patched in:
> IMPORTANT! Running a `composer update` should get you the patched version, but you also need to run `php artisan backpack:fix` afterwards, to patch your published error views, if necessary.
Workarounds
Alternatively (if you don’t want to run composer update), you can manually look inside your error views in “*resources/views/errors*” and output e($exception->getMessage()) instead of $exception->getMessage(). That’s all there is to the fix, really.
What the maintainers have done about this
Acted as soon as our team found it (last week of March 2022):
php artisan backpack:fix command;For more information
If you have any questions or comments about this advisory:
---
PS. You can read this blog post for more information.
Medium Basis: The source's own band: MODERATE
5.0.0, fixed 5.0.13 (ecosystem)5.0.13
The export has no generic command for this ecosystem.
4.1.0, fixed 4.1.69 (ecosystem)4.1.69
The export has no generic command for this ecosystem.
0, fixed 4.0.63 (ecosystem)4.0.63
The export has no generic command for this ecosystem.
Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0