Squirrel Gaming Language Allows Hackers to Inject Code into Games

  • By Dawna M. Roberts
  • Published: Oct 28, 2021
  • Last Updated: Mar 18, 2022

Threatpost reported this morning that a vulnerability in the Squirrel programming language could allow bad actors to execute malicious code within a gaming virtual machine (VM), giving them complete control over it.

What is the Threat?

Threat researchers discovered an out-of-bounds read vulnerability this week affecting the Squirrel gaming language and millions of players of online games such as Counter-Strike, Global Offensive, and Portal 2, and some cloud-based services as well.

Threatpost explains,

“Given where Squirrel lives – in games and embedded in the internet of things (IoT) – the bug potentially endangers the millions of monthly gamers who play video games such as Counter-Strike: Global Offensive and Portal 2, as well as cloud services IoT platforms with ready-to-use open-source code library.”

What is Squirrel?

Squirrel is an open-source, object-oriented programming language employed in the development of many popular games and online cloud services. “It’s a lightweight scripting language that suits the size, memory bandwidth, and real-time requirements of applications like video games and embedded systems,” Threatpost adds.”

The vulnerability has been coded as CVE-2021-41556 and is an out-of-bounds read flaw that bad actors may use to execute malicious commands within certain video games.

Squirrel Allows Hackers to Inject Code into Games

Threatpost explains how the flaw was discovered,

 “The vulnerability was discovered by SonarSource and detailed in a post published on Tuesday. In that writeup, vulnerability researchers Simon Scannell and Niklas Breitfeld suggested a real-world scenario in which an attacker could embed a malicious Squirrel script into a community map and distribute it via the trusted Steam Workshop: a mod repository for Steam Games that lets creators upload their mods for a massive built-in audience while providing regular players with an easy way to obtain mods.”

Threat researchers added,

“When a server owner downloads and installs this malicious map onto his server, the Squirrel script is executed, escapes its VM, and takes control of the server machine.”

The Technical Details

Threatpost explains the technical details,

“The security flaw concerns an “out-of-bounds access via index confusion” when defining Squirrel classes. “The fact that bitflags are set within indexes is problematic as it is entirely possible for an attacker to create a class definition with 0x02000000 methods,” the researchers explained. They created the following, “very simple” proof of concept (PoC): just a nibble’s worth of code that could be exploited to hijack a program and grant an attacker full control of the Squirrel VM.”
“The rawset and rawget functions allow us to handily access members of a given class,” according to the analysis. “In this PoC, the squirrel interpreter will dereference a null pointer and segfault because the _defaultvalues array has not been allocated yet.”

The danger is that a hacker could use the flaw to set up a fake array allowing them control over read and write values. In a proof-of-concept experiment, threat researchers were able to duplicate the event and could essentially “hijack the control flow of the program and gain full control of the Squirrel VM.”

How Can Game Players Stay Safe?

Thankfully, back in August, the maintainer of the Squirrel GitHub repository used this information to patch the vulnerability and uploaded a new source code on September 16.

Programmers should immediately update to the latest patched version. In addition, threat researchers urge all game developers to update to the newest fix commit to protect against these types of attacks.

Additionally, game players should:

  • Only download games from reputable sources.
  • Keep your games updated to the latest security patch.
  • Keep all operating systems updated.
  • Use good strong antivirus on all devices. 
  • Use long, strong passwords on all accounts.
About the Author
IDStrong Logo

Related Articles

46,000 Veterans and 13 Community Care Providers Affected by a VA Data Breach

The Incident Early last week, the Department of Veteran Affairs (VA) was breached by an unknown c ... Read More

Instagram Vulnerability Allowed Hackers Access to Control Your Phone

Security experts Check Point Research discovered a critical vulnerability while examining Instagra ... Read More

Alien Malware Infects More than 226 Mobile Apps and Steals Bank Data

As reported on September 24, 2020, by ZDNet and ThreatPost, a new strain of malware named “A ... Read More

Universal Health Systems Hit by Ransomware Attack

Universal Health Systems (UHS), a Fortune 500 company owning more than 400 hospitals across the co ... Read More

Exchange Server Bug Exposes a Big Risk to Hackers

Months after Microsoft released a patch to fix a serious flaw in MS Exchange Server, more than 61% ... Read More

Latest Articles

What You Need to Know about the Coast Guard Data Breach

What You Need to Know about the Coast Guard Data Breach

The Coast Guard is the only branch of the United States military in the Department of Homeland Security. It enforces federal law, controls the nation's borders and maritime Approaches, and protects the United States ports and waterways.

Mars Hydro Security Flaw Puts IoT Users at Risk

Mars Hydro Security Flaw Puts IoT Users at Risk

Mars Hydro is a leading Chinese brand producing a wide range of Internet of Things (IoT) devices for indoor gardening and the hydroponics industry.

What You Need to Know about the Community Health Center Data Breach

What You Need to Know about the Community Health Center Data Breach

Community Health Center (CHC) is a non-profit founded in 1972 and headquartered in Middletown, Connecticut. It offers a broad range of services, including dentistry, primary care, urgent care, specialty medical services, and behavioral health.

What You Need to Know about the DeepSeek Data Breach

What You Need to Know about the DeepSeek Data Breach

DeepSeek, founded by Liang Wenfeng, is an AI development firm located in Hangzhou, China. The company focuses on developing open source Large Language Models (LLMs) and specializes in data analytics and machine learning.

What is vendor fraud and how to protect your business from vendor fraud

What is vendor fraud and how to protect your business from vendor fraud

Vendor fraud is a type of financial abuse that occurs when fraudsters pose as legitimate businesses to trick companies and individuals into paying for services they'll never receive.

What is Automated Clearing House (ACH) Fraud and How Does it Work?

What is Automated Clearing House (ACH) Fraud and How Does it Work?

Dashboard Http: Content.infopay. net Admin Idstrong Articles Create Create Article Title Slug Subdomain (Optional) Page Status Categories CreditData BreachesData PrivacyFeatured ArticlesIdentity TheftMultiple BreachesNewsPublic RecordsScamsSecurity TipsStatisticsVideos Tags Add a tag Published Date Author Editor Show author info box Show editor info box Content

Featured Articles

How to Buy a House with Bad Credit

How to Buy a House with Bad Credit

Buying your own home is the American Dream, but it might seem out of reach to those with bad credit. However, the good news is, if your credit is less than perfect, you do still have options and in most cases, can still buy a home.

How Secure Is Your Password? Tips to Improve Your Password Security

How Secure Is Your Password? Tips to Improve Your Password Security

Any good IT article on computers and network security will address the importance of strong, secure passwords. However, the challenge of good passwords is that most people have a hard time remembering them, so they use simple or obvious ones that pose a security risk.

Top 10 Senior Scams and How to Prevent Them

Top 10 Senior Scams and How to Prevent Them

Senior scams are becoming a major epidemic for two reasons. First, seniors often have a lot of money in the bank from a life of working hard and saving.

Notice

By proceeding with this scan, you agree to let IDStrong run a Free Scan of supplied parameters of your personal information and provide free preliminary findings in compliance with our Terms of Use and Privacy Notice. You consent to us using your provided information to complete the Free Scan and compare it against our records and breach databases or sources to provide your Free preliminary findings report.

Rest assured: IDStrong will not share your information with third parties or store your information beyond what is required to perform your scan and share your results.

Free Identity Threat Scan
Instantly Check if Your Personal Information is Exposed
All fields below are required
Please enter first name
Please enter last name
Please enter a city
Please select a state
Please enter an age
Please enter an email address
Close