{"id":"CVE-2022-31114","aliases":["CVE-2022-31114","GHSA-m8xx-3x29-84h8"],"related":[],"kind":"vulnerability","state":"published","title":"backpack/crud Vulnerable to Cross-site Scripting","summary":"backpack/crud provides Create, Read, Update & Delete (CRUD) functions for Backpack, a collection of Laravel packages that help users build custom administration panels. Versions prior to 5.0.13, 4.1.69, and 4.0.63 are vulnerable to cross-site scripting. An attacker could conduct a targeted phishing campaign, in order to trick users or admins into clicking a malicious link, which under very specific circumstances could give them information or possibly admin access. Versions 5.0.13, 4.1.69, and 4.0.63 patch the issue. As a workaround, manually look inside error views in `resources/views/errors` and output `e($exception->getMessage())` instead of `$exception->getMessage()`.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"backpack/crud provides Create, Read, Update & Delete (CRUD) functions for Backpack, a collection of Laravel packages that help users build custom administration panels. Versions prior to 5.0.13, 4.1.69, and 4.0.63 are vulnerable to cross-site scripting. An attacker could conduct a targeted phishing campaign, in order to trick users or admins into clicking a malicious link, which under very specific circumstances could give them information or possibly admin access. Versions 5.0.13, 4.1.69, and 4.0.63 patch the issue. As a workaround, manually look inside error views in `resources/views/errors` and output `e($exception->getMessage())` instead of `$exception->getMessage()`.","source":"cvelist"},{"lang":"en","text":"### Impact\n\nIt’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. \n\n### Patches\n\n\nIf 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**:\n\n```bash\ncomposer update backpack/crud\nphp artisan backpack:fix\n```\n\nThe problem has been patched in:\n- v4.0.63\n- v4.1.69\n- v5.0.13\n\n> **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.**\n\n### Workarounds\n\nAlternatively (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.\n\n### What the maintainers have done about this\n\nActed as soon as our team found it (last week of March 2022):\n- Pushed patches to 5.x, 4.1 and 4.0;\n- Made it easy to apply the fix to existing projects, using a new `php artisan backpack:fix` command;\n- Kept the specific circumstances a secret; as far as they know, only the maintainer's team knows about the niche case where this exploit is possible;\n- Emailed all our licensed users, to have a chance to fix their projects before it’s public;\n- Sent an email blast to our 25.000+ strong Security Newsletter;\n- Made this public with a blog post and soon a CVE, after our community has had a reasonable chance to fix their projects;\n- Will continue to monitor this and remind paying users to apply this fix if they haven’t;\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n* Open an issue in [backpack/crud](https://github.com/laravel-backpack/crud)\n* Email us at [hello@backpackforlaravel.com](mailto:hello@backpackforlaravel.com)\n\n---\n\nPS. You can [read this blog post](https://backpackforlaravel.com/articles/news/we-recommend-you-fix-this-vulnerability) for more information.","format":"markdown","source":"ghsa"},{"lang":"es","text":"backpack/crud proporciona funciones de Crear, Leer, Actualizar y Eliminar (CRUD) para Backpack, una colección de paquetes de Laravel que ayudan a los usuarios a construir paneles de administración personalizados. Las versiones anteriores a 5.0.13, 4.1.69 y 4.0.63 son vulnerables a cross-site scripting. Un atacante podría llevar a cabo una campaña de phishing dirigida, para engañar a usuarios o administradores para que hagan clic en un enlace malicioso, lo que bajo circunstancias muy específicas podría darles información o posiblemente acceso de administrador. Las versiones 5.0.13, 4.1.69 y 4.0.63 parchean el problema. Como solución alternativa, busque manualmente dentro de las vistas de error en 'resources/views/errors' y genere 'e($exception->getMessage())' en lugar de '$exception->getMessage()'.","source":"nvd"}],"published":"2026-06-03T14:41:41.395Z","modified":"2026-09-10T03:51:09.191Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N","score":5.1,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N","score":5.1,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N","rating":"MEDIUM"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"version":">= 5.0.0, < 5.0.13","status":"affected"},{"version":">= 4.0.0, < 4.1.69","status":"affected"},{"version":"< 4.0.63","status":"affected"}],"vendor":"Laravel-Backpack","product":"CRUD","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"5.0.0","status":"affected","fixed":"5.0.13"}],"ecosystem":"Packagist","package":"backpack/crud","purl":"pkg:composer/backpack/crud","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"4.1.0","status":"affected","fixed":"4.1.69"}],"ecosystem":"Packagist","package":"backpack/crud","purl":"pkg:composer/backpack/crud","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"4.0.63"}],"ecosystem":"Packagist","package":"backpack/crud","purl":"pkg:composer/backpack/crud","source":"ghsa"}],"references":[{"url":"https://github.com/Laravel-Backpack/CRUD/security/advisories/GHSA-m8xx-3x29-84h8","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-31114","tags":["advisory"],"sources":["ghsa"]},{"url":"https://backpackforlaravel.com/articles/news/we-recommend-you-fix-this-vulnerability","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/Laravel-Backpack/CRUD","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-06-03T16:01:14.919Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-31114","url":"https://www.cve.org/CVERecord?id=CVE-2022-31114","licence":"CVE Terms of Use","modified":"2026-06-03T16:01:22.313Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-m8xx-3x29-84h8","url":"https://github.com/advisories/GHSA-m8xx-3x29-84h8","licence":"CC-BY-4.0","modified":"2026-09-10T03:51:09.191Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-31114","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-31114","licence":"Public domain","modified":"2026-07-21T19:10:00.107Z"}],"updatedAt":"2026-11-25T22:58:21.442Z","epss":{"score":0.00303,"percentile":0.24781,"date":"2026-12-01T12:00:22.000Z"}}