Skip to content
Heist/ feed
Back to feed
Medium

Security advisory

Type: advisorySources: OSVCVE: CVE-2021-46657

get_sort_by_table in MariaDB before 10.6.2 allows an application crash via certain subquery uses of ORDER BY.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2021-46657
Confirmed fixed CVEs
Not specified
Updated in this feed
1 Nov 2026, 09:27 UTC · Revision 1

Source evidence

CVE-2021-46657

core-osv · Original source

Published 29 Jan 2022, 23:15 UTC

get_sort_by_table in MariaDB before 10.6.2 allows an application crash via certain subquery uses of ORDER BY.

osv:CVE-2021-46657
Complete source record
{
  "id": "65d9f9f086b5226958520a0ed5591f5f62f5870b415a9b4414668da040fc95cd",
  "url": "https://osv.dev/vulnerability/CVE-2021-46657",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2021-46657",
    "summary": "get_sort_by_table in MariaDB before 10.6.2 allows an application crash via certain subquery uses of ORDER BY.",
    "evidence": "osv:CVE-2021-46657",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2021-46657",
      "aliases": [
        "BIT-mariadb-2021-46657",
        "BIT-mariadb-min-2021-46657",
        "BIT-mysql-client-2021-46657",
        "CVE-2021-46657"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/mariadb/server",
              "type": "GIT",
              "events": [
                {
                  "introduced": "5a6300dcc45da2d6c2b046560da0580548354b93"
                },
                {
                  "last_affected": "f20c63264ab4170fc8e45093042bd2e7272ce9fc"
                },
                {
                  "introduced": "776555af021e917ce0d6235386b43ae59fdd5161"
                },
                {
                  "fixed": "dfa2d0bc13362b949b1b1699955583f74e7db90a"
                },
                {
                  "introduced": "20ae591abd0bfe1bfaee546989ee163f4ef832b1"
                },
                {
                  "fixed": "75a65d3201a4486af96cf3277b6c5a4ba460eef7"
                },
                {
                  "introduced": "c761b43451d54eeeecdf3c102906fcce88d4e9d9"
                },
                {
                  "fixed": "c7ee039d36f69f24fb3b1c422fcff8dbf974e3eb"
                },
                {
                  "introduced": "7c7f9bef28aa566557da31402142f6dd8298ddd2"
                },
                {
                  "fixed": "dc82effa5df5e59be6c7de4038f0a832f37d9bdc"
                },
                {
                  "introduced": "1a647b700f6b72dc97211510a5d0c647d5d3d911"
                },
                {
                  "fixed": "59cf1a8a8ad07add11ea9a55ebb15828d3d99196"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:mariadb:mariadb:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "5.5.20"
                      },
                      {
                        "last_affected": "5.5.68"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:mariadb:mariadb:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "10.0.0"
                      },
                      {
                        "fixed": "10.2.39"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:mariadb:mariadb:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "10.3.0"
                      },
                      {
                        "fixed": "10.3.30"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:mariadb:mariadb:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "10.4.0"
                      },
                      {
                        "fixed": "10.4.20"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:mariadb:mariadb:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "10.5.0"
                      },
                      {
                        "fixed": "10.5.11"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:mariadb:mariadb:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "10.6.0"
                      },
                      {
                        "fixed": "10.6.2"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "mariadb-10.6.1",
            "mariadb-10.6.0",
            "mariadb-10.3.26",
            "mariadb-10.5.4",
            "mariadb-10.3.21",
            "mariadb-10.5.2",
            "mariadb-10.3.16",
            "mariadb-10.3.17",
            "mariadb-10.3.10",
            "mariadb-10.4.11",
            "mariadb-10.5.0",
            "mariadb-10.4.10",
            "mariadb-10.3.20",
            "mariadb-10.4.9",
            "mariadb-10.3.19",
            "mariadb-10.3.18",
            "mariadb-10.4.7",
            "mariadb-10.4.5",
            "mariadb-10.4.4",
            "mariadb-10.4.3",
            "mariadb-10.3.12",
            "mariadb-10.3.7",
            "mariadb-10.3.6",
            "mariadb-10.3.5",
            "mariadb-10.3.4",
            "mariadb-10.3.2",
            "mariadb-10.3.1",
            "mariadb-10.3.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-46657.json",
            "vanir_signatures": [
              {
                "id": "CVE-2021-46657-22653791",
                "digest": {
                  "threshold": 0.9,
                  "line_hashes": [
                    "9400222600408394113854955845148251550",
                    "267257386336579331390611261914774828478",
                    "189536264958544660700185072002532972839",
                    "193805967944163620182999174848777714078",
                    "282869864226996165637981041103104536726",
                    "26938163949962398934495479444415632162",
                    "72241035954307945675111933680321883477",
                    "280566434063434889408790761027231048928",
                    "92125625348087383421259905267305515415",
                    "313495999497570500203034231747698112842",
                    "272437086787124780898559560572061079011"
                  ]
                },
                "source": "https://github.com/mariadb/server/commit/dfa2d0bc13362b949b1b1699955583f74e7db90a",
                "target": {
                  "file": "storage/innobase/buf/buf0rea.cc"
                },
                "deprecated": false,
                "signature_type": "Line",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2021-46657-3552b324",
                "digest": {
                  "length": 1549,
                  "function_hash": "167158152493564073249914155441787105995"
                },
                "source": "https://github.com/mariadb/server/commit/dfa2d0bc13362b949b1b1699955583f74e7db90a",
                "target": {
                  "file": "storage/innobase/buf/buf0rea.cc",
                  "function": "buf_read_ibuf_merge_pages"
                },
                "deprecated": false,
                "signature_type": "Function",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2021-46657-6ec580f9",
                "digest": {
                  "length": 4444,
                  "function_hash": "271011855159538044750489861653873782093"
                },
                "source": "https://github.com/mariadb/server/commit/dc82effa5df5e59be6c7de4038f0a832f37d9bdc",
                "target": {
                  "file": "sql/sql_trigger.cc",
                  "function": "mysql_create_or_drop_trigger"
                },
                "deprecated": false,
                "signature_type": "Function",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2021-46657-7659b364",
                "digest": {
                  "threshold": 0.9,
                  "line_hashes": [
                    "339559886780799090878085381958061360169",
                    "151729614400971874772847717965537069600",
                    "236125119658316257140538411157439741112",
                    "233028891501776821288285970878975086616",
                    "132348789304380855063178510341696500536",
                    "207724953019298377424453045592269973150",
                    "117547820429463739401442323606832607352",
                    "3985366193169446645772796996865175148",
                    "334240053135151456882726509273030013265",
                    "243428821448236076998137058487092230093",
                    "147309012040762761595059824433377694785",
                    "170035400329405409419591926010967389127",
                    "213151042119900840179898660610293341470",
                    "181897625268163181183859475736533996731",
                    "219021583297753988810205428399564317167",
                    "182521891829878384501911324957376069386",
                    "272977007887945453962689509597528533056",
                    "298571707135824001045329467307462523673",
                    "29366491492252379221699878742008539773",
                    "188224811239451808738716452688192890238"
                  ]
                },
                "source": "https://github.com/mariadb/server/commit/dc82effa5df5e59be6c7de4038f0a832f37d9bdc",
                "target": {
                  "file": "sql/sql_trigger.cc"
                },
                "deprecated": false,
                "signature_type": "Line",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2021-46657-b9d94415",
                "digest": {
                  "threshold": 0.9,
                  "line_hashes": [
                    "183117465363777129542495803707492806621",
                    "67657611108690683428701830111045085461",
                    "63358048840660839436562395118625878523",
                    "121330641183731235168866599393679584506"
                  ]
                },
                "source": "https://github.com/mariadb/server/commit/75a65d3201a4486af96cf3277b6c5a4ba460eef7",
                "target": {
                  "file": "storage/innobase/dict/dict0dict.cc"
                },
                "deprecated": false,
                "signature_type": "Line",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2021-46657-c3c91b64",
                "digest": {
                  "length": 1994,
                  "function_hash": "765228184937249131489843188147560294"
                },
                "source": "https://github.com/mariadb/server/commit/75a65d3201a4486af96cf3277b6c5a4ba460eef7",
                "target": {
                  "file": "storage/innobase/dict/dict0dict.cc",
                  "function": "dict_set_corrupted"
                },
                "deprecated": false,
                "signature_type": "Function",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2021-46657-cdea3ff4",
                "digest": {
                  "threshold": 0.9,
                  "line_hashes": [
                    "277273648816874972059692720746076495680",
                    "183710423110090956913285231696283189815",
                    "257676914512298973488369991747556707758",
                    "79353217737707176234172779837544045217",
                    "243770059991028740159627133916562786411"
                  ]
                },
                "source": "https://github.com/mariadb/server/commit/75a65d3201a4486af96cf3277b6c5a4ba460eef7",
                "target": {
                  "file": "storage/innobase/handler/ha_innodb.cc"
                },
                "deprecated": false,
                "signature_type": "Line",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2021-46657-fed27d0a",
                "digest": {
                  "length": 4828,
                  "function_hash": "37056481603397809199317577644289172704"
                },
                "source": "https://github.com/mariadb/server/commit/75a65d3201a4486af96cf3277b6c5a4ba460eef7",
                "target": {
                  "file": "storage/innobase/handler/ha_innodb.cc",
                  "function": "ha_innobase::check"
                },
                "deprecated": false,
                "signature_type": "Function",
                "signature_version": "v1"
              }
            ],
            "vanir_signatures_modified": "2026-10-24T14:31:40Z"
          }
        }
      ],
      "modified": "2026-10-24T14:31:40.523578665Z",
      "provider": "osv",
      "references": [
        "https://security.netapp.com/advisory/ntap-20220221-0002/",
        "https://jira.mariadb.org/browse/MDEV-25629",
        "https://mariadb.com/kb/en/security/"
      ],
      "provider_metadata": {
        "unresolved_ranges": [
          {
            "cpes": [
              "cpe:2.3:a:mariadb:mariadb:*:*:*:*:*:*:*:*"
            ],
            "vendor_product": "mariadb:mariadb",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "5.5.20"
                  },
                  {
                    "last_affected": "5.5.68"
                  },
                  {
                    "introduced": "10.0.0"
                  },
                  {
                    "fixed": "10.2.39"
                  },
                  {
                    "introduced": "10.3.0"
                  },
                  {
                    "fixed": "10.3.30"
                  },
                  {
                    "introduced": "10.4.0"
                  },
                  {
                    "fixed": "10.4.20"
                  },
                  {
                    "introduced": "10.5.0"
                  },
                  {
                    "fixed": "10.5.11"
                  },
                  {
                    "introduced": "10.6.0"
                  },
                  {
                    "fixed": "10.6.2"
                  }
                ],
                "source": "CPE_RANGE"
              }
            ]
          }
        ]
      }
    },
    "related_cves": [
      {
        "value": "CVE-2021-46657",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 443771,
  "published_at": "2022-01-29T23:15:07.37+00:00"
}