A Leader in the 2026 Gartner® Magic Quadrant™ for Endpoint Protection. Six years running.Six years. Gartner® Magic Quadrant™ Leader.Find Out Why
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-47966

CVE-2021-47966: PHP Timeclock SQL Injection Vulnerability

CVE-2021-47966 is a blind SQL injection flaw in PHP Timeclock 1.04 that enables attackers to extract database contents via the login_userid parameter. This article covers technical details, affected versions, and mitigation.

Published: May 21, 2026

CVE-2021-47966 Overview

CVE-2021-47966 is a SQL injection vulnerability in PHP Timeclock 1.04, an open-source employee time tracking application. The flaw resides in the login_userid parameter of login.php, which fails to sanitize user-supplied input before passing it to SQL queries. Unauthenticated attackers can send crafted POST requests using time-based payloads with SLEEP functions or boolean-based RLIKE conditional statements. Successful exploitation enables extraction of database contents including employee names and credentials. The vulnerability is classified under [CWE-89] (Improper Neutralization of Special Elements used in an SQL Command).

Critical Impact

Unauthenticated attackers can extract sensitive database contents, including employee credentials, by sending crafted POST requests to login.php.

Affected Products

  • PHP Timeclock 1.04
  • Distributed via the SourceForge Timeclock Project
  • Download archive: PHP Timeclock 1.04 release files

Discovery Timeline

  • 2026-05-15 - CVE-2021-47966 published to NVD
  • 2026-05-18 - Last updated in NVD database

Technical Details for CVE-2021-47966

Vulnerability Analysis

The vulnerability stems from login.php directly concatenating the login_userid POST parameter into a SQL statement without parameterization or input sanitization. Attackers can break out of the intended query context and inject arbitrary SQL syntax. Both time-based blind and boolean-based blind injection techniques are viable, allowing complete extraction of database contents one character at a time. Time-based injection uses MySQL SLEEP() calls to infer data from response delays. Boolean-based injection uses RLIKE regular expression matching to infer data from differential application responses. Because authentication is not required to reach login.php, any attacker with network access to the application can exploit the flaw.

Root Cause

The root cause is improper neutralization of special characters in user-controlled input before it is incorporated into a SQL query. The login_userid parameter is interpolated into the authentication query without using prepared statements or escaping routines. PHP Timeclock 1.04 has not received vendor updates to remediate this issue. See the VulnCheck SQL Injection Advisory for additional context.

Attack Vector

The attack vector is network-based and requires no authentication or user interaction. An attacker sends a POST request to login.php with a malicious login_userid value. A time-based payload such as a SLEEP(5) clause causes the database to pause when the injected condition evaluates true, leaking data through measurable response latency. A boolean-based payload using RLIKE produces distinguishable application responses depending on whether the injected condition matches. Iterating through these payloads enables the attacker to enumerate table names, column names, and row contents such as username and password fields. A proof of concept is published as Exploit-DB #49849.

Detection Methods for CVE-2021-47966

Indicators of Compromise

  • POST requests to /login.php containing SQL keywords such as SLEEP, RLIKE, UNION, SELECT, or OR 1=1 within the login_userid parameter.
  • Web server access logs showing repeated POST requests to login.php from a single source with abnormally long response times indicative of time-based injection.
  • Database query logs containing malformed or unexpected SQL constructs originating from the Timeclock application user.
  • Anomalous outbound data volumes from the database host after interaction with the Timeclock front end.

Detection Strategies

  • Deploy a web application firewall ruleset that matches SQL injection signatures targeting login form parameters, including SLEEP(, BENCHMARK(, and RLIKE patterns.
  • Inspect HTTP request bodies submitted to login.php for non-alphanumeric characters in the login_userid field, which should normally accept only usernames.
  • Correlate failed login attempts with response latency spikes to surface time-based blind injection attempts.
  • Enable MySQL general query logging on the Timeclock backend and alert on queries containing time-delay functions.

Monitoring Recommendations

  • Forward web server, application, and database logs to a centralized analytics platform for correlation and retention.
  • Baseline normal login.php request rates and alert on volumetric anomalies from individual source addresses.
  • Monitor the application's database account for queries that read from tables outside the authentication workflow.

How to Mitigate CVE-2021-47966

Immediate Actions Required

  • Remove PHP Timeclock 1.04 from internet-exposed environments and restrict access to trusted internal networks only.
  • Place the application behind a web application firewall configured to block SQL injection payloads in form parameters.
  • Rotate all credentials stored in the Timeclock database, as they must be considered compromised if the application has been internet-exposed.
  • Audit the Timeclock database for unauthorized read activity and review web server logs for prior exploitation attempts.

Patch Information

No vendor patch is available for PHP Timeclock 1.04. The project on SourceForge has not published a fixed release addressing CVE-2021-47966. Organizations should migrate to a maintained time tracking solution. Refer to the VulnCheck SQL Injection Advisory for the authoritative advisory.

Workarounds

  • Decommission PHP Timeclock 1.04 and replace it with a supported, actively maintained alternative.
  • If the application must remain in service, restrict network access using firewall rules, VPN-only access, or IP allowlisting.
  • Apply a virtual patch at the WAF layer that rejects POST requests to login.php containing SQL metacharacters in the login_userid parameter.
  • Enforce least-privilege database permissions for the Timeclock application account to limit data exposure if injection succeeds.
bash
# Example WAF rule (ModSecurity) blocking SQL injection in login_userid
SecRule REQUEST_URI "@endsWith /login.php" \
    "id:1000001,phase:2,deny,status:403,\
    chain,msg:'PHP Timeclock CVE-2021-47966 SQLi attempt'"
    SecRule ARGS:login_userid "@rx (?i)(sleep\s*\(|benchmark\s*\(|rlike|union\s+select|or\s+1=1|--|/\*)" \
        "t:none,t:urlDecodeUni"

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

  • Vulnerability Details
  • TypeSQLI

  • Vendor/TechPhp Timeclock

  • SeverityHIGH

  • CVSS Score8.8

  • EPSS Probability0.09%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/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
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-89
  • Technical References
  • SourceForge Timeclock Project

  • SourceForge PHP Timeclock 1.04

  • Exploit-DB #49849

  • VulnCheck SQL Injection Advisory
  • Related CVEs
  • CVE-2021-47967: PHP Timeclock XSS Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today 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