Skip to main content
Cryptominers Exploited Two Auth Bypass Flaws in Qinglong's MiddlewareIncident
4 min readFor Security Engineers

Cryptominers Exploited Two Auth Bypass Flaws in Qinglong's Middleware

Incident Overview

On February 27, 2026, researchers disclosed two authentication bypass vulnerabilities in Qinglong, an open-source task scheduler with over 19,000 GitHub stars. CVE-2026-3965 and CVE-2026-4047 allowed unauthenticated attackers to execute arbitrary code remotely. Attackers exploited these flaws to deploy a cryptominer called .fullgc that consumed 85-100% of CPU resources on affected servers.

The root cause was Qinglong's authentication middleware not properly aligning with its routing logic. The application used Express.js but made incorrect assumptions about route matching, creating paths that bypassed authentication checks entirely.

Timeline of Events

Pre-February 27, 2026: Attackers discovered and began exploiting the vulnerabilities in production environments. The .fullgc cryptominer was actively deployed on exposed Qinglong instances.

February 27, 2026: Both vulnerabilities were publicly disclosed, allowing unauthenticated remote code execution through improperly secured API endpoints.

Post-disclosure: The Qinglong community began addressing the issues through GitHub pull requests and discussions. Patches were developed and released, but many self-hosted instances remained vulnerable due to delayed update cycles.

Failed or Missing Controls

Authentication Middleware Placement: Qinglong's middleware applied authentication checks at the wrong layer in the request handling chain. Routes that should have required authentication were accessible without credentials because the middleware never evaluated them.

Route Path Normalization: The application didn't account for Express.js's route matching behavior. Attackers could craft URLs that matched valid routes but skipped middleware checks. This is a classic example of assuming framework behavior without testing edge cases.

Input Validation on Authenticated Endpoints: Even if authentication had worked correctly, the endpoints that allowed code execution lacked sufficient input validation. Once attackers bypassed auth, they had direct access to command execution capabilities.

Network Segmentation: These were self-hosted instances exposed directly to the internet without additional network controls. No firewall rules, no VPN requirement, no IP allowlisting—just a task scheduler sitting on a public IP.

Resource Monitoring and Alerting: The cryptominer consumed 85-100% of CPU, yet many operators only discovered the compromise when performance degraded noticeably. No automated alerts triggered on sustained high CPU usage or unexpected process execution.

Standards and Compliance Requirements

OWASP ASVS v4.0.3 Requirement 4.1.1: "Verify that the application enforces access control rules on a trusted service layer, especially if client-side access control is present and could be bypassed." The middleware failure directly violated this. Your authentication logic must execute before any business logic, with no exceptions.

OWASP Top 10 2021 - A01:2021 Broken Access Control: Identifies authentication bypass as the most critical web application risk. The standard explicitly warns about "bypassing access control checks by modifying the URL" and "acting as a user without being logged in." Both vulnerabilities exploited exactly this pattern.

PCI DSS v4.0.1 Requirement 6.2.4: Requires: "Bespoke and custom software are developed securely." The requirement's guidance specifically calls out secure coding practices including "authentication and access controls." If you process payment data through scheduled tasks, this isn't optional.

NIST 800-53 Rev 5 Control AC-3 (Access Enforcement): Mandates: "The information system enforces approved authorizations for logical access to information and system resources." When your middleware doesn't actually enforce authorization, you're non-compliant at the most fundamental level.

ISO/IEC 27001:2022 Control 8.3 (Access Management): Requires organizations to "restrict access to information and other associated assets." Exposing an administrative interface to the internet without proper authentication controls fails this requirement entirely.

Actionable Steps for Your Team

Map Middleware Execution Order: Don't assume your framework applies middleware in the order you expect. For Express.js applications, use app.use() carefully and test that authentication middleware runs before route handlers. Create a test suite that attempts to access protected routes without credentials using various URL formats.

Test Route Matching Edge Cases: Your middleware might check /api/tasks but miss /api/tasks/, /api//tasks, or /api/tasks/../tasks. Write integration tests that try path traversal, double slashes, trailing slashes, and URL encoding. If any variation bypasses auth, you have the same vulnerability.

Implement Defense in Depth for Administrative Interfaces: Even with perfect middleware, add network-level controls. Require VPN access for administrative functions. Use IP allowlisting if your operators work from known locations. Consider mutual TLS for service-to-service communication. One authentication failure shouldn't mean total compromise.

Deploy Resource Monitoring with Automatic Alerting: Configure alerts for sustained CPU usage above 80% for more than five minutes. Monitor for new processes, especially those making network connections. The cryptominer ran for hours or days before operators noticed—that's too late. Tools like Prometheus with Alertmanager or cloud-native monitoring can catch this in real time.

Audit Self-Hosted Applications Quarterly: If you run open-source tools in production, you own their security posture. Check GitHub for security advisories. Subscribe to CVE feeds for your dependencies. Qinglong's vulnerabilities were discussed in GitHub issues before formal disclosure—community channels often provide early warning.

Create a Patch Deployment SLA for Internet-Facing Services: Self-hosted applications often lag months behind on updates. Set a policy: critical vulnerabilities in internet-exposed services get patched within 72 hours. Test in staging, then deploy. The window between disclosure and exploitation is shrinking.

Review Every Endpoint That Executes Code or Commands: Task schedulers, CI/CD systems, configuration management tools—these all execute arbitrary code by design. Every endpoint that triggers execution needs authentication, authorization, input validation, and audit logging. Map these endpoints across your infrastructure this week.

The Qinglong incident wasn't sophisticated. Attackers didn't need zero-days or advanced techniques. They found publicly accessible administrative interfaces with broken authentication and deployed a simple cryptominer. Your environment likely has similar exposures. Find them before attackers do.

Topics:Incident

You Might Also Like