Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2021-21311

CVE-2021-21311: Adminer SSRF Vulnerability

CVE-2021-21311 is a server-side request forgery flaw in Adminer database management tool that affects versions 4.0.0 to 4.7.8. This article covers the technical details, affected versions, security impact, and mitigation.

Published: February 25, 2026

CVE-2021-21311 Overview

CVE-2021-21311 is a Server-Side Request Forgery (SSRF) vulnerability affecting Adminer, an open-source database management tool distributed as a single PHP file. The vulnerability exists in Adminer versions from 4.0.0 up to (but not including) 4.7.9. Users of Adminer versions bundling all drivers (e.g., adminer.php) are affected by this security flaw, which allows attackers to make arbitrary HTTP requests from the vulnerable server.

Critical Impact

This vulnerability is listed in the CISA Known Exploited Vulnerabilities Catalog, indicating active exploitation in the wild. Attackers can leverage this SSRF to access internal services, exfiltrate sensitive data, or pivot to other systems within the network.

Affected Products

  • Adminer versions 4.0.0 to 4.7.8 (all driver bundles)
  • Debian Linux 9.0 (via packaged Adminer)
  • Any deployment using the bundled adminer.php with all drivers enabled

Discovery Timeline

  • 2021-02-11 - CVE-2021-21311 published to NVD
  • 2025-10-24 - Last updated in NVD database

Technical Details for CVE-2021-21311

Vulnerability Analysis

The SSRF vulnerability in Adminer arises from improper handling of HTTP responses in the Elasticsearch and ClickHouse database drivers. When connecting to these database types, Adminer makes HTTP requests to user-specified server addresses. Prior to the patch, error responses from these requests would display the full HTTP response body directly to the user, enabling attackers to craft malicious connection requests that target internal services and retrieve their responses.

This vulnerability is classified under CWE-918 (Server-Side Request Forgery), where a web application can be induced to make requests to an arbitrary domain of the attacker's choosing. The network-accessible attack vector with no user interaction required makes this particularly dangerous in environments where Adminer is exposed to untrusted users.

Root Cause

The root cause lies in the error handling logic within the Elasticsearch (elastic.inc.php) and ClickHouse (clickhouse.inc.php) driver files. When the HTTP response code was not 200, the vulnerable code would assign the entire response body to the error message, which would then be displayed to the user. This allowed attackers to read responses from arbitrary internal HTTP endpoints by specifying them as the database server address.

Attack Vector

An attacker can exploit this vulnerability by configuring Adminer to connect to an internal service (such as cloud metadata endpoints, internal APIs, or other HTTP services) instead of a legitimate database. The attacker specifies the target internal URL as the database server, and when the connection fails or returns a non-200 response, Adminer would leak the response content in the error message. This enables reconnaissance of internal infrastructure and potential data exfiltration.

php
// Vulnerable code pattern (before patch) in elastic.inc.php and clickhouse.inc.php:
if (!preg_match('~^HTTP/[0-9.]+ 2~i', $http_response_header[0])) {
    $this->error = $file;  // Full response body exposed
    return false;
}

// Patched code - suppresses response content:
if (!preg_match('~^HTTP/[0-9.]+ 2~i', $http_response_header[0])) {
    $this->error = lang('Invalid credentials.') . " $http_response_header[0]";  // Only HTTP status exposed
    return false;
}

Source: GitHub Commit

Detection Methods for CVE-2021-21311

Indicators of Compromise

  • Unusual connection attempts from Adminer to internal IP ranges (e.g., 169.254.169.254 for cloud metadata, 127.0.0.1, 10.x.x.x, 192.168.x.x)
  • Database connection attempts specifying non-standard ports or HTTP-based URLs as server addresses
  • Error messages containing unexpected HTTP response bodies or internal service data
  • Log entries showing failed database connections to internal endpoints

Detection Strategies

  • Monitor web application logs for connection attempts to internal IP addresses through Adminer's login interface
  • Implement network-level detection for outbound HTTP requests from web servers to internal metadata endpoints or RFC 1918 addresses
  • Review access logs for patterns indicating reconnaissance activity through database connection attempts
  • Deploy web application firewalls (WAF) with SSRF detection rules to block requests targeting internal services

Monitoring Recommendations

  • Enable detailed logging on Adminer deployments to capture all connection parameters
  • Configure alerting for any database connection attempts to non-whitelisted IP addresses or hostnames
  • Monitor outbound network traffic from web servers for connections to cloud metadata services (e.g., 169.254.169.254)
  • Implement application-layer monitoring to detect unusual patterns in database driver usage

How to Mitigate CVE-2021-21311

Immediate Actions Required

  • Upgrade Adminer to version 4.7.9 or later immediately, as this version contains the security fix
  • Restrict network access to Adminer installations by implementing IP whitelisting or VPN requirements
  • Remove or disable unused database drivers, particularly Elasticsearch and ClickHouse if not required
  • Implement egress filtering to prevent the web server from making connections to internal services or metadata endpoints

Patch Information

The vulnerability was addressed in Adminer version 4.7.9. The fix modifies the error handling in both adminer/drivers/clickhouse.inc.php and adminer/drivers/elastic.inc.php to prevent HTTP response bodies from being exposed in error messages. The patch replaces the full response content with a generic "Invalid credentials" message followed only by the HTTP status header.

The security patch is available via:

  • GitHub Security Advisory
  • Packagist Package
  • Debian LTS Security Update

Workarounds

  • If immediate patching is not possible, disable the Elasticsearch and ClickHouse drivers by using a custom Adminer build that excludes these drivers
  • Place Adminer behind a reverse proxy that enforces authentication before access
  • Implement network segmentation to prevent the web server from reaching internal services or cloud metadata endpoints
  • Consider temporarily removing Adminer from production environments until patching can be completed
bash
# Configuration example: Network-level mitigation using iptables
# Block outbound connections to cloud metadata endpoints from web server
iptables -A OUTPUT -d 169.254.169.254 -j DROP

# Block connections to internal RFC 1918 ranges from the web process
iptables -A OUTPUT -d 10.0.0.0/8 -p tcp -m owner --uid-owner www-data -j DROP
iptables -A OUTPUT -d 172.16.0.0/12 -p tcp -m owner --uid-owner www-data -j DROP
iptables -A OUTPUT -d 192.168.0.0/16 -p tcp -m owner --uid-owner www-data -j DROP

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeSSRF

  • Vendor/TechAdminer

  • SeverityHIGH

  • CVSS Score7.2

  • EPSS Probability94.21%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CISA KEV Information
  • In CISA KEVYes
  • CWE References
  • CWE-918
  • Technical References
  • SSRF Documentation PDF

  • Debian LTS Announcement

  • Packagist Package Details

  • CISA Known Exploited Vulnerability
  • Vendor Resources
  • GitHub Commit Update

  • GitHub Security Advisory
  • Related CVEs
  • CVE-2026-25892: Adminer DOS Vulnerability

  • CVE-2021-29625: Adminer Database Management XSS Flaw
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English