CVE-2021-41556

Source
https://cve.org/CVERecord?id=CVE-2021-41556
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2021-41556.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2021-41556
Downstream
Related
Published
2022-07-28T21:15:08.057Z
Modified
2026-03-13T14:49:26.068310Z
Severity
  • 10.0 (Critical) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H CVSS Calculator
Summary
[none]
Details

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.

References

Affected packages

Git / github.com/albertodemichelis/squirrel

Affected ranges

Type
GIT
Repo
https://github.com/albertodemichelis/squirrel
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed
Type
GIT
Repo
https://github.com/albertodemichelis/squirrel
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed

Affected versions

v3.*
v3.1

Database specific

unresolved_ranges
[
    {
        "events": [
            {
                "introduced": "0"
            },
            {
                "last_affected": "2.2.5"
            }
        ]
    },
    {
        "events": [
            {
                "introduced": "3.0"
            },
            {
                "last_affected": "3.1"
            }
        ]
    },
    {
        "events": [
            {
                "introduced": "0"
            },
            {
                "last_affected": "35"
            }
        ]
    },
    {
        "events": [
            {
                "introduced": "0"
            },
            {
                "last_affected": "36"
            }
        ]
    },
    {
        "events": [
            {
                "introduced": "0"
            },
            {
                "last_affected": "2.2.5"
            }
        ]
    },
    {
        "events": [
            {
                "introduced": "3.x"
            },
            {
                "last_affected": "3.1"
            }
        ]
    },
    {
        "events": [
            {
                "introduced": "0"
            },
            {
                "last_affected": "video"
            }
        ]
    }
]
vanir_signatures
[
    {
        "signature_version": "v1",
        "target": {
            "function": "SQClass::NewSlot",
            "file": "squirrel/sqclass.cpp"
        },
        "digest": {
            "length": 1327.0,
            "function_hash": "218714802154936925267298589577355166457"
        },
        "source": "https://github.com/albertodemichelis/squirrel/commit/23a0620658714b996d20da3d4dd1a0dcf9b0bd98",
        "signature_type": "Function",
        "id": "CVE-2021-41556-7378500a",
        "deprecated": false
    },
    {
        "signature_version": "v1",
        "target": {
            "file": "squirrel/sqclass.cpp"
        },
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "92675059631009288048213461542740346520",
                "296186921292990067100642253571993597728",
                "40872597398596125545265975713465823595",
                "178672236382474547461178361631356191776"
            ]
        },
        "source": "https://github.com/albertodemichelis/squirrel/commit/23a0620658714b996d20da3d4dd1a0dcf9b0bd98",
        "signature_type": "Line",
        "id": "CVE-2021-41556-ed2333f9",
        "deprecated": false
    }
]
source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2021-41556.json"