Skip to content
Heist/ feed
Back to feed
High

Security advisory

Type: advisorySources: OSVCVE: CVE-2021-33657

There is a heap overflow problem in video/SDL_pixels.c in SDL (Simple DirectMedia Layer) 2.x to 2.0.18 versions. By crafting a malicious .BMP file, an attacker can cause the application using this library to crash, denial of service or Code execution.

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

Source evidence

CVE-2021-33657

core-osv · Original source

Published 1 Apr 2022, 23:15 UTC

There is a heap overflow problem in video/SDL_pixels.c in SDL (Simple DirectMedia Layer) 2.x to 2.0.18 versions. By crafting a malicious .BMP file, an attacker can cause the application using this library to crash, denial of service or Code execution.

osv:CVE-2021-33657
Complete source record
{
  "id": "71212933ac72273c46c1a13a20ca38e7959606ef284410231c71f605a01b022d",
  "url": "https://osv.dev/vulnerability/CVE-2021-33657",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2021-33657",
    "summary": "There is a heap overflow problem in video/SDL_pixels.c in SDL (Simple DirectMedia Layer) 2.x to 2.0.18 versions. By crafting a malicious .BMP file, an attacker can cause the application using this library to crash, denial of service or Code execution.",
    "evidence": "osv:CVE-2021-33657",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2021-33657",
      "aliases": [
        "CVE-2021-33657"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/libsdl-org/sdl",
              "type": "GIT",
              "events": [
                {
                  "introduced": "1ad936eb29cf4506a7a103e8288d732f23e9c2b0"
                },
                {
                  "last_affected": "2e9821423a237a1206e3c09020778faacfe430be"
                },
                {
                  "fixed": "8c91cf7dba5193f5ce12d06db1336515851c9ee9"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:libsdl:simple_directmedia_layer:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "2.0.0"
                      },
                      {
                        "last_affected": "2.0.18"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "8c91cf7dba5193f5ce12d06db1336515851c9ee9"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-33657.json",
            "vanir_signatures": [
              {
                "id": "CVE-2021-33657-493fc812",
                "digest": {
                  "length": 673,
                  "function_hash": "135559890956021690986487977211098728481"
                },
                "source": "https://github.com/libsdl-org/sdl/commit/8c91cf7dba5193f5ce12d06db1336515851c9ee9",
                "target": {
                  "file": "src/video/SDL_pixels.c",
                  "function": "Map1to1"
                },
                "deprecated": false,
                "signature_type": "Function",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2021-33657-52cbc3ff",
                "digest": {
                  "length": 860,
                  "function_hash": "120029847142050598506380381411279339480"
                },
                "source": "https://github.com/libsdl-org/sdl/commit/8c91cf7dba5193f5ce12d06db1336515851c9ee9",
                "target": {
                  "file": "src/video/SDL_pixels.c",
                  "function": "Map1toN"
                },
                "deprecated": false,
                "signature_type": "Function",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2021-33657-795aa1c9",
                "digest": {
                  "threshold": 0.9,
                  "line_hashes": [
                    "237541296599115013407641409675079124889",
                    "272085526378248488061226745576933115711",
                    "235132022122211645155266490537828432366",
                    "103230726993537480189666107780129338690",
                    "159352565534071501880625154615757691494",
                    "63061321940708442293120198552799010986",
                    "43469035986305709707052829820256164457",
                    "101640187021522532256005357573848813681"
                  ]
                },
                "source": "https://github.com/libsdl-org/sdl/commit/8c91cf7dba5193f5ce12d06db1336515851c9ee9",
                "target": {
                  "file": "src/video/SDL_pixels.c"
                },
                "deprecated": false,
                "signature_type": "Line",
                "signature_version": "v1"
              }
            ],
            "vanir_signatures_modified": "2026-10-20T14:23:26Z"
          }
        }
      ],
      "modified": "2026-10-20T14:23:26.385626802Z",
      "provider": "osv",
      "references": [
        "https://lists.debian.org/debian-lts-announce/2023/02/msg00008.html",
        "https://security.gentoo.org/glsa/202305-17",
        "https://security.gentoo.org/glsa/202305-18",
        "https://github.com/libsdl-org/SDL/commit/8c91cf7dba5193f5ce12d06db1336515851c9ee9"
      ],
      "provider_metadata": {}
    },
    "related_cves": [
      {
        "value": "CVE-2021-33657",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 388863,
  "published_at": "2022-04-01T23:15:10.363+00:00"
}