---
id: CVE-2021-27218
title: An issue was discovered in GNOME GLib before 2.66.7 and 2.67.x before 2.67.4
summary: >-
  An issue was discovered in GNOME GLib before 2.66.7 and 2.67.x before 2.67.4.
  If g_byte_array_new_take() was called with a buffer of 4GB or more on a 64-bit
  platform, the length would be truncated modulo 2**32, causing unintended
  length …
severity: high
cvss: 7.5
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'
cwe:
  - CWE-681
vendor: gnome
product: glib
affected:
  - glib < 2.66.7
  - 'glib >= 2.67.0, < 2.67.4'
  - fedora = 33
  - fedora = 34
  - active_iq_unified_manager
  - cloud_backup
  - e-series_performance_analyzer
  - brocade_fabric_operating_system_firmware
  - debian_linux = 9.0
patched:
  - glib 2.67.4
published: '2021-02-15'
updated: '2026-10-14'
sourceUpdated: '2026-10-14T12:17:10.057'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2021-27218'
references:
  - url: 'https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1942'
    label: cve@mitre.org
  - url: 'https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1944'
    label: cve@mitre.org
  - url: >-
      https://lists.apache.org/thread.html/r58af02e294bd07f487e2c64ffc0a29b837db5600e33b6e698b9d696b%40%3Cissues.bookkeeper.apache.org%3E
    label: cve@mitre.org
  - url: >-
      https://lists.apache.org/thread.html/rf4c02775860db415b4955778a131c2795223f61cb8c6a450893651e4%40%3Cissues.bookkeeper.apache.org%3E
    label: cve@mitre.org
  - url: >-
      https://lists.apache.org/thread.html/rf9fa47ab66495c78bb4120b0754dd9531ca2ff0430f6685ac9b07772%40%3Cdev.mina.apache.org%3E
    label: cve@mitre.org
  - url: 'https://lists.debian.org/debian-lts-announce/2022/06/msg00006.html'
    label: cve@mitre.org
  - url: >-
      https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/2REA7RVKN7ZHRLJOEGBRQKJIPZQPAELZ/
    label: cve@mitre.org
  - url: >-
      https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/JJMPNDO4GDVURYQFYKFOWY5HAF4FTEPN/
    label: cve@mitre.org
  - url: 'https://security.gentoo.org/glsa/202107-13'
    label: cve@mitre.org
  - url: 'https://security.netapp.com/advisory/ntap-20210319-0004/'
    label: cve@mitre.org
  - url: 'https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1942'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1944'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: >-
      https://lists.apache.org/thread.html/r58af02e294bd07f487e2c64ffc0a29b837db5600e33b6e698b9d696b%40%3Cissues.bookkeeper.apache.org%3E
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: >-
      https://lists.apache.org/thread.html/rf4c02775860db415b4955778a131c2795223f61cb8c6a450893651e4%40%3Cissues.bookkeeper.apache.org%3E
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: >-
      https://lists.apache.org/thread.html/rf9fa47ab66495c78bb4120b0754dd9531ca2ff0430f6685ac9b07772%40%3Cdev.mina.apache.org%3E
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://lists.debian.org/debian-lts-announce/2022/06/msg00006.html'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: >-
      https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/2REA7RVKN7ZHRLJOEGBRQKJIPZQPAELZ/
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: >-
      https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/JJMPNDO4GDVURYQFYKFOWY5HAF4FTEPN/
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://security.gentoo.org/glsa/202107-13'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://security.netapp.com/advisory/ntap-20210319-0004/'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://cert-portal.siemens.com/productcert/html/ssa-398330.html'
    label: 0b142b55-0307-4c5a-b3c9-f314f3fb7c5e
tags:
  - nvd
  - cve.org
epss: 0.0408
epssPercentile: 0.90491
ingestedAt: '2026-10-14T12:29:10.815Z'
---

## Overview

An issue was discovered in GNOME GLib before 2.66.7 and 2.67.x before 2.67.4. If g_byte_array_new_take() was called with a buffer of 4GB or more on a 64-bit platform, the length would be truncated modulo 2**32, causing unintended length truncation.

## Affected

- `glib < 2.66.7`
- `glib >= 2.67.0, < 2.67.4`
- `fedora = 33`
- `fedora = 34`
- `active_iq_unified_manager`
- `cloud_backup`
- `e-series_performance_analyzer`
- `brocade_fabric_operating_system_firmware`
- `debian_linux = 9.0`

## Remediation

Upgrade past the affected range:

- `glib 2.67.4`
