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
    • 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-32819

CVE-2021-32819: Squirrelly Template Engine RCE Vulnerability

CVE-2021-32819 is a remote code execution vulnerability in Squirrelly template engine that allows attackers to execute arbitrary code by overwriting internal configuration options. This article covers technical details, affected versions, impact, and mitigation steps.

Published: February 25, 2026

CVE-2021-32819 Overview

CVE-2021-32819 is a Remote Code Execution (RCE) vulnerability affecting Squirrelly, a JavaScript template engine designed to work seamlessly with ExpressJS. The vulnerability arises from the unsafe mixing of pure template data with engine configuration options through the Express render API. By overwriting internal configuration options, attackers can trigger remote code execution in downstream applications that utilize Squirrelly for template rendering.

Critical Impact

Remote attackers can achieve arbitrary code execution on vulnerable servers by manipulating template configuration options, potentially leading to complete system compromise.

Affected Products

  • Squirrelly versions prior to 9.0.0
  • Squirrelly version 8.0.8 (confirmed vulnerable)
  • Applications using Squirrelly with ExpressJS render API

Discovery Timeline

  • 2021-05-14 - CVE-2021-32819 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2021-32819

Vulnerability Analysis

The vulnerability exists in how Squirrelly processes data objects passed through the Express render API. The template engine failed to properly isolate user-controlled template data from internal configuration settings. When rendering templates, Squirrelly would merge user-supplied data including a settings property directly into the configuration object, allowing attackers to override critical engine options that control code execution behavior.

This design flaw creates an injection point where malicious input can modify how the template engine processes and executes template code. The vulnerability is particularly dangerous in web applications where user input is passed to template rendering functions without adequate validation, enabling attackers to craft payloads that override internal settings and achieve code execution on the server.

Root Cause

The root cause stems from improper input validation in the file handlers component. The vulnerable code would accept a settings property from the data object and merge it directly into the engine's configuration using a copyProps utility function. This allowed external data to contaminate internal engine state.

The fix removed the settings interface from the DataObj type definition and eliminated the use of copyProps for merging view options, ensuring that user-supplied data cannot influence engine configuration.

Attack Vector

The attack leverages the Express render API integration where Squirrelly processes user-controlled data objects. An attacker can craft a malicious request containing configuration-overriding properties that, when processed by the template engine, modify execution behavior to achieve remote code execution.

The attack requires user interaction (such as visiting a crafted URL or submitting a malicious form), but can be executed remotely over the network without authentication. Once successful, the attacker gains the ability to execute arbitrary code with the privileges of the Node.js application process.

typescript
// Security patch removing settings interface from DataObj
// Source: https://github.com/squirrellyjs/squirrelly/commit/c12418a026f73df645ba927fd29358efe02fed1e

 }
 
 interface DataObj {
-  settings?: {
-    [key: string]: any
-  }
   [key: string]: any
 }
 
typescript
// Security patch removing copyProps import for view options handling
// Source: https://github.com/squirrellyjs/squirrelly/commit/dca7a1e7ee91d8a6ffffb655f3f15647486db9da

 import compile from './compile'
 import { getConfig } from './config'
 import { getPath, readFile, loadFile } from './file-utils'
-import { promiseImpl, copyProps } from './utils'
+import { promiseImpl } from './utils'
 
 /* TYPES */
 

Detection Methods for CVE-2021-32819

Indicators of Compromise

  • Unusual HTTP requests containing settings properties targeting template rendering endpoints
  • Node.js application logs showing unexpected configuration changes or errors during template rendering
  • Process spawning or network connections originating from the Node.js application that are not part of normal operation

Detection Strategies

  • Monitor application logs for template rendering errors or unexpected behavior in Squirrelly-powered endpoints
  • Implement Web Application Firewall (WAF) rules to detect and block requests containing suspicious settings objects in POST/GET parameters
  • Deploy runtime application self-protection (RASP) solutions to detect configuration tampering attempts

Monitoring Recommendations

  • Enable verbose logging for Express application template rendering operations
  • Monitor for outbound network connections or process executions from the Node.js process that indicate post-exploitation activity
  • Track dependency versions in package.json and alert on vulnerable Squirrelly versions

How to Mitigate CVE-2021-32819

Immediate Actions Required

  • Upgrade Squirrelly to version 9.0.0 or later immediately
  • Audit all applications using Squirrelly with ExpressJS for potential exposure
  • Review application code to ensure user input is not directly passed to template render functions without validation

Patch Information

The vulnerability has been fixed in Squirrelly version 9.0.0. The fix involves removing the ability for user-supplied data to override engine configuration options. The patches can be reviewed in the GitHub Pull Request #254 and associated commits. For complete technical details, refer to the GitHub Security Advisory GHSL-2021-023.

Workarounds

  • If immediate upgrade is not possible, sanitize all user input before passing to Squirrelly render functions, specifically removing any settings properties from data objects
  • Implement input validation middleware in Express to filter out configuration-like properties from request data
  • Consider temporarily disabling dynamic template rendering features that accept user input until the upgrade can be completed
bash
# Update Squirrelly to patched version
npm update squirrelly@^9.0.0

# Or install the specific patched version
npm install squirrelly@9.0.0 --save

# Verify installed version
npm list squirrelly

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechSquirrelly

  • SeverityHIGH

  • CVSS Score8.8

  • EPSS Probability88.45%

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

  • NVD-CWE-noinfo
  • Technical References
  • GitHub Commit Update 1

  • GitHub Commit Update 2

  • GitHub Pull Request #254

  • GitHub Security Advisory GHSL-2021-023
  • Latest CVEs
  • CVE-2025-9185: Mozilla Firefox RCE Vulnerability

  • CVE-2025-9184: Mozilla Firefox RCE Vulnerability

  • CVE-2025-9180: Mozilla Firefox Auth Bypass Vulnerability

  • CVE-2025-8030: Mozilla Firefox RCE Vulnerability
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