Skip to content
Heist/ feed
Back to feed
Critical

Security advisory

Type: advisorySources: OSVCVE: CVE-2021-41556

sqclass.cpp in Squirrel through 2.2.5 and 3.x through 3.1 allows an out-of-bounds read (in the core interpreter) that can lead to Code Execution. If a victim executes an attacker-controlled squirrel script, it is possible for the attacker to break out of the squirrel script sandbox even if all dangerous functionality such as File System functions has been disabled. An attacker might abuse this bug to target (for example) Cloud services that allow customization via SquirrelScripts, or distribute malware through video games that embed a Squirrel Engine.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2021-41556
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 12:37 UTC · Revision 1

Source evidence

CVE-2021-41556

core-osv · Original source

Published 28 Jul 2022, 21:15 UTC

sqclass.cpp in Squirrel through 2.2.5 and 3.x through 3.1 allows an out-of-bounds read (in the core interpreter) that can lead to Code Execution. If a victim executes an attacker-controlled squirrel script, it is possible for the attacker to break out of the squirrel script sandbox even if all dangerous functionality such as File System functions has been disabled. An attacker might abuse this bug to target (for example) Cloud services that allow customization via SquirrelScripts, or distribute malware through video games that embed a Squirrel Engine.

osv:CVE-2021-41556
Complete source record
{
  "id": "8ab3113b072fed87cf2ae9767d1f2a669cfb247f41408b3b0a6b819144f929f1",
  "url": "https://osv.dev/vulnerability/CVE-2021-41556",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2021-41556",
    "summary": "sqclass.cpp in Squirrel through 2.2.5 and 3.x through 3.1 allows an out-of-bounds read (in the core interpreter) that can lead to Code Execution. If a victim executes an attacker-controlled squirrel script, it is possible for the attacker to break out of the squirrel script sandbox even if all dangerous functionality such as File System functions has been disabled. An attacker might abuse this bug to target (for example) Cloud services that allow customization via SquirrelScripts, or distribute malware through video games that embed a Squirrel Engine.",
    "evidence": "osv:CVE-2021-41556",
    "products": [],
    "severity": "critical",
    "structured": {
      "id": "CVE-2021-41556",
      "aliases": [
        "CVE-2021-41556"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/albertodemichelis/squirrel",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "last_affected": "c52b25d864400197fa4d64c46254d8b1de06c2fa"
                },
                {
                  "fixed": "23a0620658714b996d20da3d4dd1a0dcf9b0bd98"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:squirrel-lang:squirrel:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "3.0"
                      },
                      {
                        "last_affected": "3.1"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "23a0620658714b996d20da3d4dd1a0dcf9b0bd98"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v3.1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-41556.json",
            "vanir_signatures": [
              {
                "id": "CVE-2021-41556-7378500a",
                "digest": {
                  "length": 1327,
                  "function_hash": "218714802154936925267298589577355166457"
                },
                "source": "https://github.com/albertodemichelis/squirrel/commit/23a0620658714b996d20da3d4dd1a0dcf9b0bd98",
                "target": {
                  "file": "squirrel/sqclass.cpp",
                  "function": "SQClass::NewSlot"
                },
                "deprecated": false,
                "signature_type": "Function",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2021-41556-ed2333f9",
                "digest": {
                  "threshold": 0.9,
                  "line_hashes": [
                    "92675059631009288048213461542740346520",
                    "296186921292990067100642253571993597728",
                    "40872597398596125545265975713465823595",
                    "178672236382474547461178361631356191776"
                  ]
                },
                "source": "https://github.com/albertodemichelis/squirrel/commit/23a0620658714b996d20da3d4dd1a0dcf9b0bd98",
                "target": {
                  "file": "squirrel/sqclass.cpp"
                },
                "deprecated": false,
                "signature_type": "Line",
                "signature_version": "v1"
              }
            ],
            "vanir_signatures_modified": "2026-10-20T14:06:42Z"
          }
        }
      ],
      "modified": "2026-10-20T14:06:42.626352619Z",
      "provider": "osv",
      "references": [
        "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BV7SJJ44AGAX4ILIVPREIXPJ2GOG3FKV/",
        "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/M3FQILX7UUEERSDPMZP3MKGTMY2E7ESU/",
        "https://github.com/albertodemichelis/squirrel/commit/23a0620658714b996d20da3d4dd1a0dcf9b0bd98",
        "https://www.sonarsource.com/blog/squirrel-vm-sandbox-escape/",
        "https://blog.sonarsource.com/squirrel-vm-sandbox-escape/"
      ],
      "provider_metadata": {
        "unresolved_ranges": [
          {
            "cpes": [
              "cpe:2.3:a:squirrel-lang:squirrel:*:*:*:*:*:*:*:*"
            ],
            "vendor_product": "squirrel-lang:squirrel",
            "extracted_events": [
              {
                "range": [
                  {
                    "last_affected": "2.2.5"
                  }
                ],
                "source": "CPE_RANGE"
              }
            ]
          },
          {
            "cpes": [
              "cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:*",
              "cpe:2.3:o:fedoraproject:fedora:36:*:*:*:*:*:*:*"
            ],
            "vendor_product": "fedoraproject:fedora",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "35"
                  },
                  {
                    "last_affected": "35"
                  },
                  {
                    "introduced": "36"
                  },
                  {
                    "last_affected": "36"
                  }
                ],
                "source": "CPE_STRING"
              }
            ]
          }
        ]
      }
    },
    "related_cves": [
      {
        "value": "CVE-2021-41556",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 388563,
  "published_at": "2022-07-28T21:15:08.057+00:00"
}