CVE-2021-29625 is a medium-severity (CVSS 6.1) Cross-site Scripting (XSS) vulnerability in vrana/adminer. 1 public exploit or proof-of-concept reference is indexed, so weaponization risk is real. A fix is available for vrana/adminer — see the affected versions and patch details below.
XSS in doc_link
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
vrana/adminerReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.
Description
Impact
Users of MySQL, MariaDB, PgSQL and SQLite are affected. XSS is in most cases prevented by strict CSP in all modern browsers. The only exception is when Adminer is using a pdo_ extension to communicate with the database (it is used if the native extensions are not enabled). In browsers without CSP, Adminer versions 4.6.1 to 4.8.0 are affected.
Patches
Patched by 4043092, included in version 4.8.1.
Workarounds
Do both:
- Use browser supporting strict CSP.
- Enable the native PHP extensions (e.g.
mysqli) or disable displaying PHP errors (display_errors).
References
https://sourceforge.net/p/adminer/bugs-and-features/797/
For more information
If you have any questions or comments about this advisory:
- Comment at 4043092.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐘Packagist | vrana/adminer | ≥ 4.7.8&&< 4.8.1 | 4.8.1composer require vrana/adminer:^4.8.1 |
Affected Products
admineradminerResearch use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for vrana/adminer, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update vrana/adminer to 4.8.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2021-29625 is resolved across your whole dependency graph.
Workarounds
Escape or sanitise the affected output on the server side rather than relying on client-side filtering, and add a Content-Security-Policy that blocks inline script execution so injected markup cannot run even if it reaches the page.
How to detect CVE-2021-29625
A community-maintained Nuclei template exists for this CVE. You can scan for it directly:
nuclei -id cve-2021-29625 -u https://target- Template
- Adminer <=4.8.0 - Cross-Site Scripting
- Severity
- medium
- Impact
- Successful exploitation of this vulnerability could allow an attacker to inject malicious scripts into the Adminer interface, potentially leading to session hijacking, defacement, or theft of sensitive information.
- Remediation
- This vulnerability is patched in version 4.8.1. As workarounds, one can use a browser supporting strict CSP or enable the native PHP extensions (e.g. `mysqli`) or disable displaying PHP errors (`display_errors`).
Template by ProjectDiscovery nuclei-templates (daffainfo), MIT licensed. View the full template. Scan only systems you are authorised to test.
Frequently Asked Questions
Is CVE-2021-29625 in your dependencies?
Find it across Packagist, including transitive dependencies.