CriticalCVE-2021-21311

    SSRF in adminer (CVE-2021-21311)

    Published In CISA KEV since Sources: pwn.watch, CVE.org, OSV

    What is affected, what to do

    Adminer is an open-source database management in a single PHP file. In adminer from version 4.0.0 and before 4.7.9 there is a server-side request forgery vulnerability.

    The vulnerability is being actively exploited; treat it as a priority. Update adminer to version 4.7.9. Immediate actions, mitigation and detection rules are in the runbook below.

    Affected
    • Vrana Adminer gte 4.0.0, < 4.7.9..*

    Not sure whether and how you are affected? Ask a question about this vulnerability

    Metrics

    7.2

    Priority

    XIEM Effective CVSS: highest available CVSS rating from NVD and vendor data.

    Source: NVD, CVSS v3

    7.2

    CVSS v3

    Severity High on the scale from 0 to 10.

    Source: pwn.watch, CVE.org, OSV

    98.5 %

    EPSS score

    High — model estimates ≥ 50% chance of real-world exploitation within 30 days.

    Source: FIRST EPSS, percentile 99.92

    Show all metrics
    Severity
    Critical
    Priority (0–325)

    The priority score is a consolidated metric that condenses several individual signals into a single, action-guiding ranking: technical severity (CVSS), exploitation likelihood (EPSS), known-exploited status (KEV) and the context of the affected asset. The aim is to answer the only truly important question in vulnerability management: what first?

    Read in glossary
    215.87 Methodology
    Exploit maturity

    An exploit is code or a technique that specifically uses a concrete vulnerability to force unintended behaviour — such as executing code or escalating privileges. It is the tool that turns a theoretical flaw into a practical attack.

    Read in glossary
    actively exploited
    XIEM Effective CVSS

    XIEM® is the tiered managed-security operating model from NEOSEC and a registered trademark of NEOSEC GmbH. It extends classic SIEM — the central collection, normalisation and correlation of security-relevant events — with endpoint forensics, network visibility and deception technology, and consolidates them into three building tiers: Sentry, Orchestrate and Command.

    Read in glossary
    7.2 Methodology
    CVSS v3

    CVSS is the globally established, open standard for assessing the technical severity of a vulnerability on a scale from 0 to 10. It describes how easily a flaw can be exploited and what damage it can cause — but not how likely its actual exploitation is. CVSS and the complementary EPSS deliberately answer different questions.

    Read in glossary
    7.2
    EPSS score

    The EPSS score is the absolute model output for an individual vulnerability: the estimated probability of real-world exploitation within the next 30 days, expressed as a value between 0 and 1 (i.e. 0 % to 100 %). A score of 0.42 means „the model estimates a 42 % chance of real-world exploitation within 30 days“.

    Read in glossary
    98.5 %
    High — model estimates ≥ 50% chance of real-world exploitation within 30 days.
    EPSS percentile

    The EPSS percentile is the relative position of a vulnerability within all EPSS-scored CVEs, expressed as a value between 0 and 1. A percentile of 0.90 means „this CVE has a higher EPSS score than 90 % of all other scored CVEs“. Unlike the EPSS score, it is not a probability — but a positioning within a ranking.

    Read in glossary
    99.92
    Critical — this CVE ranks in the top fifth of all CVEs scored today (rank ≥ 80%).
    KEV status

    The KEV catalogue is a list maintained by the US authority CISA of vulnerabilities for which active exploitation in the wild has been confirmed. It answers not the question „how severe?“ but „is it already being attacked?“ — thereby sharply prioritising patching.

    Read in glossary
    Actively exploited
    Published
    In CISA KEV since

    The KEV catalogue is a list maintained by the US authority CISA of vulnerabilities for which active exploitation in the wild has been confirmed. It answers not the question „how severe?“ but „is it already being attacked?“ — thereby sharply prioritising patching.

    Read in glossary
    CISA assessment (SSVC)
    Exploitation: active · automatable · Technical impact: partial
    Source: CISA Vulnrichment, as of 27 September 2025
    CWE

    CWE is a catalogue of typical weakness types in software and hardware — such as flawed input validation, unsafe memory handling or poor authentication. Where a CVE names a concrete vulnerability in a concrete product, a CWE describes the underlying class of defect.

    Read in glossary
    CWE-918

    Response and mitigation

    Why act now?

    Prioritisation rationale

    The flaw is network-reachable without authentication and needs no user interaction. Because of the scope change, its impact extends beyond Adminer into internal services and cloud metadata endpoints. It ranks among the CVEs most likely to be exploited of any on record. Typical targets are forgotten, publicly reachable Adminer files on shared hosting, dev and staging environments, and cloud VMs, where stealing IAM credentials through the metadata service is the real payoff. CISA does not flag known ransomware use. Even so, treat any externally reachable instance below 4.7.9 as critical with a 24-hour fix window, especially in the cloud. Internal-only instances behind VPN can go into the regular patch cycle at high priority.

    1. Runbook step 1

      Immediate response (0-24 h)

      • Inventory every Adminer instance: Adminer is a single PHP file and is often dropped under arbitrary names. Sweep webroots, e.g. grep -rlE 'adminer|\$VERSION = "4\.' /var/www /srv /opt --include=*.php. Also check Composer dependencies (vrana/adminer in composer.lock) and Debian 9 packages (dpkg -l adminer).
      • Patch: Upgrade every instance from 4.0.0 through 4.7.8 to at least 4.7.9, ideally to the current upstream release. On Debian 9, take the fix from Debian security updates. Look up the exact package version in the Debian advisory.
      • Kill internet exposure now: Adminer should never be internet-facing. If an instance isn't needed, delete the file outright rather than renaming it. Otherwise restrict access with web-server ACLs to admin networks or VPN, e.g. Require ip 10.0.0.0/8 (Apache) or allow/deny (nginx).
      • Assume credential exposure on cloud hosts: If a vulnerable, publicly reachable instance ran on AWS, Azure or GCP, treat instance metadata and temporary IAM credentials as potentially leaked. Rotate the role credentials and review CloudTrail or the Azure Activity Log for anomalous API calls.
      • Rotate database credentials: Do this for every account used through the affected Adminer instance if the logs show foreign access or if no logs exist.
    2. Runbook step 2

      Mitigation layers

      • Network segmentation / egress filtering: Web servers running PHP apps should not open outbound connections to the internet, especially to ports 9200 (Elasticsearch) and 8123 (ClickHouse HTTP). Outbound 80/443 should be limited to defined update targets. The SSRF abuses the drivers that send HTTP requests to an attacker-controlled server. If that server answers with a redirect, Adminer follows it to an internal target.
      • Protect cloud metadata: Enforce IMDSv2 on AWS (HttpTokens=required, hop limit 1). Also block the web-server user from reaching 169.254.169.254 with a host firewall rule, e.g. iptables -A OUTPUT -d 169.254.169.254 -m owner --uid-owner www-data -j DROP.
      • WAF / reverse-proxy rule: Block requests to Adminer paths that carry the elastic= or clickhouse= parameters if those drivers aren't needed operationally. Alternatively, enforce an allowlist of permitted database hosts in the server or driver parameter.
      • Configuration hardening: Replace the all-drivers adminer.php build with one that bundles only the drivers you actually use (e.g. MySQL only). Add a login plugin that pins the server target.
      • Access control and least privilege: Put authentication in front of Adminer (HTTP basic auth, SSO proxy, mTLS). Give the database accounts used through Adminer only the minimum privileges they need.
    3. Runbook step 3

      Detection rules

      • Web access logs: Look for requests that point driver parameters at external hosts. A Sigma selection could be cs-uri-query|contains: ['elastic=', 'clickhouse='] combined with cs-uri-stem|contains: 'adminer'. SPL example: index=web uri_query="*elastic=*" OR uri_query="*clickhouse=*" | stats count by src_ip, uri_query.
      • Network telemetry (Zeek/Suricata): Treat web-server connections to external IPs on tcp/9200 or tcp/8123 as suspicious. In Zeek http.log, flag 301/302 responses whose Location header points to RFC1918 addresses, localhost or 169.254.169.254.
      • Cloud metadata access: Detect connections from the PHP-FPM or Apache process to 169.254.169.254. Sources are Sysmon for Linux EID 3 or EDR network events with the ancestry php-fpm/apache2 → network connect. Correlate with VPC Flow Logs.
      • Cloud audit logs: Instance-role credentials used from IPs outside your estate indicate abuse. In CloudTrail, look for userIdentity.type=AssumedRole with a sourceIPAddress outside your ranges. In GuardDuty, this surfaces as the finding UnauthorizedAccess:IAMUser/InstanceCredentialExfiltration.
      • Adminer error output: Watch for unusually large response sizes on Adminer login requests. The SSRF reflects the body of the internal response back inside the error message.

    Detection rules

    No NEOSEC detection rule is available for this vulnerability yet.

    Classification under NIS2 and CRA

    Rule-based classification from exploitation status and severity. It does not replace a case-by-case assessment.

    NIS2

    NIS2 is EU Directive (EU) 2022/2555 to raise the level of cybersecurity across the Union. It substantially broadens obligations compared with the first NIS directive: more sectors, mandatory risk management, staged reporting duties and personal accountability of senior management.

    Read in glossary
    Actively exploited: treat the vulnerability as a priority in vulnerability handling under Art. 21(2)(e) NIS2. If it is exploited in your environment, check the reporting obligation under Art. 23 (early warning within 24 hours).
    CRA

    The CRA is EU Regulation (EU) 2024/2847 setting horizontal cybersecurity requirements for „products with digital elements“ — from industrial controllers and software to connected consumer devices. For the first time manufacturers must ensure security across the entire product lifecycle, handle vulnerabilities and provide security updates.

    Read in glossary
    Since 11.09.2026, manufacturers of affected products with digital elements must report actively exploited vulnerabilities under Art. 14 CRA, with an early warning within 24 hours via ENISA's single reporting platform.
    ISO/IEC 27001

    ISO/IEC 27001 is the internationally leading standard for an information security management system (ISMS). It describes a risk-based, process-oriented framework to systematically plan, implement, review and improve information security.

    Read in glossary
    Control A.8.8, management of technical vulnerabilities: assess relevance to your systems, plan remediation and keep evidence.

    Description

    Adminer is an open-source database management in a single PHP file. In adminer from version 4.0.0 and before 4.7.9 there is a server-side request forgery vulnerability. Users of Adminer versions bundling all drivers (e.g. `adminer.php`) are affected. This is fixed in version 4.7.9.

    Source: pwn.watch, NVD (NIST), OSV (Open Source Vulnerabilities), cvelistv5, CISA KEV Catalog, CVE.org (MITRE)

    Affected products

    The following versions are affected. Older releases of the same product line are also vulnerable unless stated otherwise.

    Affected products
    Affected versionsFixed in
    vranaadminer
    • ≥ 4.0.0, < 4.7.9
    • —
    admineradminer
    • 4.0.0 – < 4.7.9
    • 4.7.9
    packagistvrana/adminer
    • v4.2.5
    • v4.6.1
    • v4.2.3
    • v4.3.0
    • v4.3.1
    • v4.7.8
    • v4.7.4
    • v4.6.3
    • v4.7.5
    • v4.4.0
    • v4.2.4
    • v4.6.2
    • v4.2.0
    • v4.6.0
    • v4.7.0
    • v4.7.7
    • v4.5.0
    • v4.7.3
    • v4.7.1
    • v4.7.2
    • v4.2.1
    • v4.2.2
    • v4.7.6
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —

    Vendors and products

    Affected operating systems

    Affected operating systems
    Linuxdebiandebian_linux9.0

    Weakness classes (CWE)

    • CWE-918Server-Side Request Forgery (SSRF)

      Base

      The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.

      Entry at MITRE CWE-918

    Public exploit references

    Publicly reported proof-of-concepts, exploit modules and detection templates for this vulnerability. NEOSEC links to the original sources only and does not provide any exploit code.

    Public exploit references
    CISA KEV CatalogCISA Known Exploited Vulnerability (opens in a new tab)cisa.govactively exploited
    Reference tagged as exploitgithub.com (opens in a new tab)PoC (publicly reported)reported, not verified—

    References & sources

    • github.comAdminer advisory: Adminerweb, x_refsource_CONFIRM, Patch, Third-party advisory, pwn-watch
    • NVD (NIST)NVD: CVE-2021-21311advisory, pwn-watch
    • github.comvrana/adminer/commit/ccd2374b0b12bd547417bf0dacdf153826c83351web, x_refsource_MISC, Patch
    • github.comvrana/adminerpackage
    • github.comvrana/adminer/files/5957311/Adminer.SSRF.pdfweb, x_refsource_MISC, Exploit, Third-party advisory
    • lists.debian.org[debian-lts-announce] 20210302 [SECURITY] [DLA 2580-1] adminer security updateweb, Mailing list, x_refsource_MLIST, Mailing list, Third-party advisory
    • packagist.orgpackages/vrana/adminerweb, x_refsource_MISC, Product, Third-party advisory
    • sourceforge.netp/adminer/news/2021/02/adminer-479-releasedweb
    • cisa.govknown-exploited-vulnerabilities-catalog?field_cve=CVE-2021-21311web, government-resource, US government resource
    • pwn.watchpwn.watch: Adminer: Server-Side Request Forgery Vulnerabilitypwn-watch
    • cisa.govCISA Known Exploited Vulnerabilities Catalogpwn-watch
    Embed badge

    Show the severity and KEV status of this vulnerability on your site – with a link back here. The image is updated hourly.

    Badge preview for CVE-2021-21311
    <a href="https://intel.neosec.eu/en/cve/CVE-2021-21311"><img src="https://intel.neosec.eu/badge/cve/CVE-2021-21311.svg?lang=en" alt="CVE-2021-21311 – NEOSEC Intel" height="20"></a>