Skip to content
Heist/ feed
Back to feed
HighFix available

libx11 — security advisory

Type: advisorySources: OSVAdvisory ID: ALPINE-CVE-2023-3138

A vulnerability was found in libX11. The security flaw occurs because the functions in src/InitExt.c in libX11 do not check that the values provided for the Request, Event, or Error IDs are within the bounds of the arrays that those functions write to, using those IDs as array indexes. They trust that they were called with values provided by an Xserver adhering to the bounds specified in the X11 protocol, as all X servers provided by X.Org do. As the protocol only specifies a single byte for these values, an out-of-bounds value provided by a malicious server (or a malicious proxy-in-the-middle) can only overwrite other portions of the Display structure and not write outside the bounds of the Display structure itself, possibly causing the client to crash with this memory corruption.

Products
libx11
Affected versions
Not specified
Fixed versions
1.7.3.1-r1, 1.8-r1, 1.8.4-r1, 1.8.4-r4
CVEs
CVE-2023-3138
Confirmed fixed CVEs
Not specified
Updated in this feed
1 Nov 2026, 14:57 UTC · Revision 1

Source evidence

ALPINE-CVE-2023-3138

core-osv · Original source

Published 28 Jun 2023, 21:15 UTC

A vulnerability was found in libX11. The security flaw occurs because the functions in src/InitExt.c in libX11 do not check that the values provided for the Request, Event, or Error IDs are within the bounds of the arrays that those functions write to, using those IDs as array indexes. They trust that they were called with values provided by an Xserver adhering to the bounds specified in the X11 protocol, as all X servers provided by X.Org do. As the protocol only specifies a single byte for these values, an out-of-bounds value provided by a malicious server (or a malicious proxy-in-the-middle) can only overwrite other portions of the Display structure and not write outside the bounds of the Display structure itself, possibly causing the client to crash with this memory corruption.

osv:ALPINE-CVE-2023-3138

libx11

Fixed versions: 1.7.3.1-r1

libx11

Fixed versions: 1.8-r1

libx11

Fixed versions: 1.8.4-r1

libx11

Fixed versions: 1.8.4-r4

Complete source record
{
  "id": "5dbb6c9d970e370d452c70efef8bad27f9e66d2e2af165cfc838dd93f1e711fe",
  "url": "https://osv.dev/vulnerability/ALPINE-CVE-2023-3138",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "ALPINE-CVE-2023-3138",
    "summary": "A vulnerability was found in libX11. The security flaw occurs because the functions in src/InitExt.c in libX11 do not check that the values provided for the Request, Event, or Error IDs are within the bounds of the arrays that those functions write to, using those IDs as array indexes. They trust that they were called with values provided by an Xserver adhering to the bounds specified in the X11 protocol, as all X servers provided by X.Org do. As the protocol only specifies a single byte for these values, an out-of-bounds value provided by a malicious server (or a malicious proxy-in-the-middle) can only overwrite other portions of the Display structure and not write outside the bounds of the Display structure itself, possibly causing the client to crash with this memory corruption.",
    "evidence": "osv:ALPINE-CVE-2023-3138",
    "products": [
      {
        "name": {
          "value": "libx11",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "1.7.3.1-r1",
            "evidence": "/affected/0/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "libx11",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "1.8-r1",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "libx11",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "1.8.4-r1",
            "evidence": "/affected/2/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "libx11",
          "evidence": "/affected/3/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "1.8.4-r4",
            "evidence": "/affected/3/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "high",
    "structured": {
      "id": "ALPINE-CVE-2023-3138",
      "aliases": [
        "ALPINE-CVE-2023-3138"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "1.7.3.1-r1"
                }
              ]
            }
          ],
          "package": {
            "name": "libx11",
            "purl": "pkg:apk/alpine/libx11?arch=source",
            "ecosystem": "Alpine:v3.15"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2023-3138.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "1.8-r1"
                }
              ]
            }
          ],
          "package": {
            "name": "libx11",
            "purl": "pkg:apk/alpine/libx11?arch=source",
            "ecosystem": "Alpine:v3.16"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2023-3138.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "1.8.4-r1"
                }
              ]
            }
          ],
          "package": {
            "name": "libx11",
            "purl": "pkg:apk/alpine/libx11?arch=source",
            "ecosystem": "Alpine:v3.17"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2023-3138.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "1.8.4-r4"
                }
              ]
            }
          ],
          "package": {
            "name": "libx11",
            "purl": "pkg:apk/alpine/libx11?arch=source",
            "ecosystem": "Alpine:v3.18"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2023-3138.json"
          },
          "ecosystem_specific": {}
        }
      ],
      "modified": "2026-10-26T17:17:58.622069732Z",
      "provider": "osv",
      "upstream": [
        "CVE-2023-3138"
      ],
      "references": [
        "https://security.alpinelinux.org/vuln/CVE-2023-3138"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2023-3138",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 454430,
  "published_at": "2023-06-28T21:15:10.247+00:00"
}