CVE-2022-31114
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedbackpack/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()`.
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · high confidenceThe vulnerability is a cross-site scripting (XSS) issue in error view files where exception messages are output without proper HTML escaping. The raw `$exception->getMessage()` is displayed in error pages, allowing attackers to inject malicious scripts via crafted exception messages that execute when users view error pages.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Network
- Complexity
- Low
- Privileges
- None
- Authentication
- X
- User interaction
- A
- Scope
- X
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Identify if Backpack CRUD is installedCheck your composer.json dependencies section for 'backpack/crud' entry, or run 'composer show backpack/crud' to see installed package information.Affected if Backpack CRUD is not present in dependencies at all, so the vulnerability does not apply.
-
Determine installed Backpack CRUD versionRun 'composer show backpack/crud' or check the version field in composer.json under require. Compare the version number to affected ranges: 5.x below 5.0.13, 4.1.x below 4.1.69, or 4.0.x below 4.0.63.Affected if The installed version falls within any of these vulnerable version ranges.
-
Locate error view templatesCheck if your Laravel project has custom error view files in the resources/views/errors directory. Look for files like 404.blade.php, 500.blade.php, or other error templates.Affected if Custom error views exist in resources/views/errors - if using only default Backpack error views, the vulnerability may still apply.
-
Inspect error views for unescaped exception messagesOpen each error view file in resources/views/errors and search for instances where $exception->getMessage() or similar exception output appears without the 'e()' HTML escape helper, such as {{ $exception->getMessage() }} instead of {{ e($exception->getMessage()) }}.Affected if Any error view file contains $exception->getMessage() rendered without HTML escaping (not wrapped with e() helper).
You are affected if you have a vulnerable Backpack CRUD version (5.x < 5.0.13, 4.1.x < 4.1.69, or 4.0.x < 4.0.63) AND you have custom error views in resources/views/errors that render exception messages without using the e() escape helper.
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
dbcve · scopedUpgrade to version 5.0.13, 4.1.69, or 4.0.63 (depending on your branch), or manually escape exception output in error views by replacing `$exception->getMessage()` with `e($exception->getMessage())` in resources/views/errors.
5.0.13 (for v5.x) or 4.1.69 (for v4.1.x) or 4.0.63 (for v4.0.x)
- 1. Identify the current version of backpack/crud in your project by checking composer.json
- 2. Determine which version branch you are on (4.x or 5.x) to select the appropriate upgrade target
- 3. Run 'composer require backpack/crud:5.0.13' to upgrade to the fixed version if on v5, or 'composer require backpack/crud:4.1.69' if on v4.1, or 'composer require backpack/crud:4.0.63' if on v4.0
- 4. Run 'composer update backpack/crud' to apply the changes
- 5. Test the application thoroughly to ensure the upgrade does not break existing functionality
- 6. Alternatively, if upgrading is not immediately feasible, manually edit error views in 'resources/views/errors' and replace '$exception->getMessage()' with 'e($exception->getMessage())' to apply the patch
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation1.0 h
- Implementation2.0 h
- Testing2.0 h
- Review / QA1.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $1,664.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2022-31114 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2022-31114 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data