The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
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
    • 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-40124

CVE-2021-40124: Cisco AnyConnect Privilege Escalation Flaw

CVE-2021-40124 is a privilege escalation vulnerability in Cisco AnyConnect Secure Mobility Client for Windows that allows attackers to execute code with SYSTEM privileges. This article covers technical details, affected versions, and mitigation.

Published: March 4, 2026

CVE-2021-40124 Overview

A vulnerability in the Network Access Manager (NAM) module of Cisco AnyConnect Secure Mobility Client for Windows could allow an authenticated, local attacker to escalate privileges on an affected device. This vulnerability is due to incorrect privilege assignment to scripts executed before user logon. An attacker could exploit this vulnerability by configuring a script to be executed before logon. A successful exploit could allow the attacker to execute arbitrary code with SYSTEM privileges.

Critical Impact

Local attackers with authenticated access can escalate privileges to SYSTEM level, enabling complete compromise of the affected Windows system through malicious pre-logon script execution.

Affected Products

  • Cisco AnyConnect Secure Mobility Client for Windows
  • Cisco AnyConnect Secure Mobility Client with Network Access Manager (NAM) module enabled

Discovery Timeline

  • 2021-11-04 - CVE CVE-2021-40124 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2021-40124

Vulnerability Analysis

This privilege escalation vulnerability exists within the Network Access Manager (NAM) module of Cisco AnyConnect Secure Mobility Client for Windows. The core issue stems from incorrect privilege assignment (CWE-266) and improper privilege management (CWE-269) affecting scripts that execute during the pre-logon phase of the Windows authentication process.

The NAM module is designed to provide comprehensive network access management capabilities, including 802.1X authentication and network profile management. As part of its functionality, NAM supports the execution of custom scripts before user logon to perform network configuration tasks. However, the vulnerability arises because these pre-logon scripts inherit elevated SYSTEM privileges regardless of the security context in which they should operate.

Root Cause

The vulnerability is caused by incorrect privilege assignment to scripts executed before user logon. The NAM module fails to properly restrict the privilege level at which pre-logon scripts execute, allowing them to run with SYSTEM-level permissions. This design flaw enables authenticated local attackers to leverage the pre-logon script functionality as a privilege escalation vector by configuring malicious scripts that will execute with the highest Windows privilege level.

Attack Vector

The attack vector for this vulnerability is local, requiring the attacker to have authenticated access to the target system. The exploitation path involves:

  1. An authenticated local user gains access to the AnyConnect NAM configuration interface
  2. The attacker configures a malicious script to be executed during the pre-logon phase
  3. During the next system startup or user logon event, the NAM module executes the configured script
  4. Due to the incorrect privilege assignment, the script executes with SYSTEM privileges
  5. The attacker's payload runs with full administrative control over the system

The vulnerability requires no user interaction beyond the initial configuration of the malicious script. Once configured, the privilege escalation occurs automatically during the pre-logon phase, making detection challenging as the malicious activity occurs before standard user-level monitoring is active.

Detection Methods for CVE-2021-40124

Indicators of Compromise

  • Unexpected or unauthorized modifications to AnyConnect NAM pre-logon script configurations
  • New or modified scripts appearing in AnyConnect NAM configuration directories
  • Unusual process execution activity during system startup with SYSTEM privileges originating from NAM components
  • Windows Event Log entries showing script execution from NAM module with elevated privileges

Detection Strategies

  • Monitor AnyConnect NAM configuration files and directories for unauthorized changes
  • Implement file integrity monitoring (FIM) on AnyConnect installation directories
  • Review Windows Security Event Logs for privilege escalation attempts associated with vpnagent.exe or NAM-related processes
  • Deploy endpoint detection solutions to identify suspicious script execution during pre-logon phase

Monitoring Recommendations

  • Enable verbose logging for Cisco AnyConnect client operations
  • Configure alerting for modifications to NAM profile configurations
  • Monitor for unusual SYSTEM-level process creation during Windows startup sequences
  • Implement behavioral analysis for pre-logon script execution patterns

How to Mitigate CVE-2021-40124

Immediate Actions Required

  • Review all pre-logon scripts configured in the NAM module for unauthorized or suspicious entries
  • Restrict administrative access to AnyConnect NAM configuration to trusted users only
  • Apply the latest security patch from Cisco as detailed in their security advisory
  • Consider temporarily disabling pre-logon script functionality if not required for operations

Patch Information

Cisco has released a security update to address this vulnerability. Administrators should consult the Cisco Security Advisory cisco-sa-anyconnect-nam-priv-yCsRNUGT for specific version information and download the appropriate patched version of Cisco AnyConnect Secure Mobility Client for their environment.

Workarounds

  • Disable the Network Access Manager (NAM) module if 802.1X authentication is not required
  • Remove or disable pre-logon script execution capabilities through NAM policy configuration
  • Implement strict access controls limiting which users can modify NAM configurations
  • Deploy application whitelisting to prevent unauthorized script execution during pre-logon phase
bash
# Configuration example
# Verify AnyConnect version and check for vulnerable NAM module
# Run from elevated command prompt
"C:\Program Files (x86)\Cisco\Cisco AnyConnect Secure Mobility Client\vpnagent.exe" -v

# Review NAM configuration for pre-logon scripts
# Configuration files typically located in:
# C:\ProgramData\Cisco\Cisco AnyConnect Secure Mobility Client\Network Access Manager\

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

  • Vulnerability Details
  • TypePrivilege Escalation

  • Vendor/TechCisco Anyconnect

  • SeverityHIGH

  • CVSS Score7.8

  • EPSS Probability0.04%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-266

  • CWE-269
  • Vendor Resources
  • Cisco Security Advisory
  • Related CVEs
  • CVE-2023-20178: Cisco AnyConnect Privilege Escalation Bug

  • CVE-2020-3556: Cisco AnyConnect Privilege Escalation Flaw

  • CVE-2025-20271: Cisco Meraki AnyConnect VPN DoS Flaw

  • CVE-2023-20241: Cisco AnyConnect Secure Client DoS Flaw
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