Cross-site Scripting (XSS)Weakness · CWE-79

CVE-2022-31114

MEDIUM · 5.1 CVSS v4.0 Published 2026-06-03
Mitigation only
No fix yet — a mitigation exists. There is no fixed release. A documented workaround reduces exposure in the meantime.
See remediation →
58/100
Remediation priority · Elevated
Remotely reachable No privileges

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 · unedited
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()`.

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 confidence

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

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

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 checks

Work through these to decide whether this CVE applies to you.

  1. Identify if Backpack CRUD is installed
    Check 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.
  2. Determine installed Backpack CRUD version
    Run '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.
  3. Locate error view templates
    Check 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.
  4. Inspect error views for unescaped exception messages
    Open 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.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

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 · scoped
Mitigation available No clean upgrade yet — mitigate in the meantime
Mitigation

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

Recommended fix High confidence

5.0.13 (for v5.x) or 4.1.69 (for v4.1.x) or 4.0.63 (for v4.0.x)

  1. 1. Identify the current version of backpack/crud in your project by checking composer.json
  2. 2. Determine which version branch you are on (4.x or 5.x) to select the appropriate upgrade target
  3. 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. 4. Run 'composer update backpack/crud' to apply the changes
  5. 5. Test the application thoroughly to ensure the upgrade does not break existing functionality
  6. 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
Caveat Check Backpack changelog for any breaking changes between your current version and the target fixed version before upgrading in production

Generated from the published advisory — verify against the referenced sources before acting.

Have this fixed Scoped from the published advisory
  • Consultation1.0 h
  • Implementation2.0 h
  • Testing2.0 h
  • Review / QA1.0 h
6.0 hours of engineering $1,040
Get help mitigating

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 locally
dbcve dependency scanner

Check 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 sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2022-31114 in production — separate from our analysis above.

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.

What this is

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.

What belongs here
  • 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