CVE-2023-4156
Heap out of bound read in builtin.c
A heap out-of-bounds read flaw was found in builtin.c in the gawk package. This issue may lead to a crash and could be used to read sensitive information.
Attack profile
How easy it is to exploit
- Attack vector
- Local
- Complexity
- Low
- Privileges needed
- None
- User interaction
- Required
What an attacker can affect
- Confidentiality
- Low
- Integrity
- None
- Availability
- Low
Exploit likelihood
What each source reports
CVE List Score used
4.4
Heap out of bound read in builtin.c
A heap out-of-bounds read flaw was found in builtin.c in the gawk package. This issue may lead to a crash and could be used to read sensitive information.
- Record
CVE-2023-4156- CVSS 3.1
- 4.4 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:L - Weakness
- CWE-125
- Updated
- 2026-11-02
EUVDEUVD-2023-54036
4.4
A heap out-of-bounds read flaw was found in builtin.c in the gawk package. This issue may lead to a crash and could be used to read sensitive information.
- Record
EUVD-2023-54036- CVSS 3.1
- 4.4 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:L - Updated
- 2026-11-03
GitHub AdvisoriesGHSA-8p8g-pp68-479w
4.4
A heap out-of-bounds read flaw was found in builtin.c in the gawk package. This issue may lead to...
A heap out-of-bounds read flaw was found in builtin.c in the gawk package. This issue may lead to a crash and could be used to read sensitive information.
- Record
GHSA-8p8g-pp68-479w- CVSS 3.1
- 4.4 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:L - Weakness
- CWE-125
- Updated
- 2026-11-02
NVD
4.4
A heap out-of-bounds read flaw was found in builtin.c in the gawk package. This issue may lead to a crash and could be used to read sensitive information.
- Record
CVE-2023-4156- CVSS 3.1
- 4.4 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:L - CVSS 3.1
- 7.1 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H - Weakness
- CWE-125
- Updated
- 2026-11-02
OSVAZL-30045
7.1
CVE-2023-4156 affecting package gawk for versions less than 5.1.1-1
A heap out-of-bounds read flaw was found in builtin.c in the gawk package. This issue may lead to a crash and could be used to read sensitive information.
- Record
AZL-30045- CVSS 3.1
- 7.1 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H - Updated
- 2026-11-02
OSVBELL-CVE-2023-4156
7.1
CVE-2023-4156 does not affect BellSoft software
- Record
BELL-CVE-2023-4156- CVSS 3.1
- 7.1 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H - Updated
- 2026-11-02
Show 13 moreShow less
OSV
7.1
A heap out-of-bounds read flaw was found in builtin.c in the gawk package. This issue may lead to a crash and could be used to read sensitive information.
- Record
CVE-2023-4156- CVSS 3.1
- 7.1 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H - Updated
- 2026-11-02
OSVDEBIAN-CVE-2023-4156
7.1
A heap out-of-bounds read flaw was found in builtin.c in the gawk package. This issue may lead to a crash and could be used to read sensitive information.
- Record
DEBIAN-CVE-2023-4156- CVSS 3.1
- 7.1 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H - Updated
- 2026-11-02
OSVOESA-2023-1575
3.3
gawk security update
The gawk package is the GNU implementation of awk. The awk utility interprets a special-purpose programming language that makes it possible to handle simple data-reformatting jobs with just a few lines of code.
Security Fix(es):
A heap out of bound read issue exists in builtin.c of gawk prior to version 5.1.1. The array "the_args" takes an unsafe index "val", while it does not validate the index to ensure the index refers to a valid position in the array (e.g., exceedingly large or negative). The vulnerability can cause crash of the software and might be used by attackers to read sensitive information.
https://mail.gnu.org/archive/html/bug-gawk/2022-08/msg00000.html https://mail.gnu.org/archive/html/bug-gawk/2022-08/msg00023.html https://fossies.org/linux/gawk/ChangeLog#470 (Line: 470-475)(CVE-2023-4156)
- Record
OESA-2023-1575- CVSS 3.1
- 3.3 Low
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L - Updated
- 2026-11-02
OSVUBUNTU-CVE-2023-4156
7.1
A heap out-of-bounds read flaw was found in builtin.c in the gawk package. This issue may lead to a crash and could be used to read sensitive information.
- Record
UBUNTU-CVE-2023-4156- CVSS 3.1
- 7.1 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H - CVSS 3.1
- 4.4 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:L - Updated
- 2026-11-02
OSVCLSA-2024-1712176685 No score
gawk: Fix of CVE-2023-4156
- Fix CVE-2023-4156: builtin.c (format_tree): When collecting positional field widths or precisions, check for wrap around to negative values.
- Record
CLSA-2024-1712176685- Updated
- 2026-11-02
OSVCLSA-2025-1751619853 No score
gawk: Fix of CVE-2023-4156
- CVE-2023-4156: fix heap out-of-bounds read flaw in builtin.c to prevent potential crash and information leakage
- Record
CLSA-2025-1751619853- Updated
- 2026-11-02
OSVCLSA-2026-1777030298 No score
gawk: Fix of CVE-2023-4156
- CVE-2023-4156: fix heap out-of-bounds read flaw in builtin.c to prevent potential crash and information leakage
- Record
CLSA-2026-1777030298- Updated
- 2026-11-02
OSVCLSA-2026-1777888717 No score
gawk: Fix of CVE-2023-4156
- Fix CVE-2023-4156: builtin.c (format_tree): When collecting positional field widths or precisions, check for wrap around to negative values.
- Record
CLSA-2026-1777888717- Updated
- 2026-11-02
OSVCLSA-2026-1792508988 No score
gawk: Fix of 3 CVEs
- CVE-2023-4156: builtin.c (format_tree): when collecting positional field widths or precisions, check for wrap around to negative values
- CVE-2026-40469: builtin.c (sub_common): check for overflow in the result buffer size calculation using 64-bit math, failing with a fatal error instead of corrupting the heap on 32-bit builds
- Record
CLSA-2026-1792508988- Updated
- 2026-11-02
OSVCLSA-2026-1792612080 No score
gawk: Fix of 3 CVEs
- CVE-2023-4156: builtin.c (format_tree): when collecting positional field widths or precisions, check for wrap around to negative values
- CVE-2026-40469: builtin.c (sub_common): check for overflow in the result buffer size calculation using 64-bit math, failing with a fatal error instead of corrupting the heap on 32-bit builds
- Record
CLSA-2026-1792612080- Updated
- 2026-11-02
OSVSUSE-SU-2023:3431-1 No score
Security update for gawk
This update for gawk fixes the following issues:
- CVE-2023-4156: Fix a heap out of bound read by validating the index into argument list. (bsc#1214025)
- Record
SUSE-SU-2023:3431-1- Updated
- 2026-11-02
OSVSUSE-SU-2023:3440-1 No score
Security update for gawk
This update for gawk fixes the following issues:
- CVE-2023-4156: Fix a heap out of bound read by validating the index into argument list. (bsc#1214025)
- Record
SUSE-SU-2023:3440-1- Updated
- 2026-11-02
OSVUSN-6373-1 No score
gawk vulnerability
It was discovered that gawk could be made to read out of bounds when processing certain inputs. If a user or an automated system were tricked into opening a specially crafted input, an attacker could possibly use this issue to cause a denial of service.
- Record
USN-6373-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
gawkAzure Linux:2 |
before 5.1.1-1 | 5.1.1-1 |
gawkTuxCare:CentOS:7 |
before 4.0.2-4.el7_3.1.tuxcare.els1 | 4.0.2-4.el7_3.1.tuxcare.els1 |
gawkTuxCare:AlmaLinux:9.2 |
before 5.1.0-6.el9.tuxcare.els1 | 5.1.0-6.el9.tuxcare.els1 |
gawk-all-langpacksTuxCare:AlmaLinux:9.2 |
before 5.1.0-6.el9.tuxcare.els1 | 5.1.0-6.el9.tuxcare.els1 |
gawk-develTuxCare:AlmaLinux:9.2 |
before 5.1.0-6.el9.tuxcare.els1 | 5.1.0-6.el9.tuxcare.els1 |
gawk-docTuxCare:AlmaLinux:9.2 |
before 5.1.0-6.el9.tuxcare.els1 | 5.1.0-6.el9.tuxcare.els1 |
gawkTuxCare:AlmaLinux:9.6 |
before 5.1.0-6.el9.tuxcare.els1 | 5.1.0-6.el9.tuxcare.els1 |
gawk-all-langpacksTuxCare:AlmaLinux:9.6 |
before 5.1.0-6.el9.tuxcare.els1 | 5.1.0-6.el9.tuxcare.els1 |
gawk-develTuxCare:AlmaLinux:9.6 |
before 5.1.0-6.el9.tuxcare.els1 | 5.1.0-6.el9.tuxcare.els1 |
gawk-docTuxCare:AlmaLinux:9.6 |
before 5.1.0-6.el9.tuxcare.els1 | 5.1.0-6.el9.tuxcare.els1 |
Show 30 moreShow less
| Package | Affected | Fixed |
|---|---|---|
gawkTuxCare:OracleLinux:7 |
before 4.0.2-4.el7_3.1.tuxcare.els1 | 4.0.2-4.el7_3.1.tuxcare.els1 |
gawkTuxCare:CentOS:6 From an advisory covering 2 CVEs |
before 3.1.7-10.el6_7.3.tuxcare.els2 | 3.1.7-10.el6_7.3.tuxcare.els2 |
gawkTuxCare:OracleLinux:6 From an advisory covering 2 CVEs |
before 3.1.7-10.el6_7.3.tuxcare.els2 | 3.1.7-10.el6_7.3.tuxcare.els2 |
gawkDebian:12 |
before 1:5.2.1-1 | 1:5.2.1-1 |
gawkDebian:13 |
before 1:5.2.1-1 | 1:5.2.1-1 |
gawkDebian:14 |
before 1:5.2.1-1 | 1:5.2.1-1 |
gawkopenEuler:20.03-LTS-SP1 |
before 5.0.1-5.oe1 | 5.0.1-5.oe1 |
gawkopenEuler:20.03-LTS-SP3 |
before 5.0.1-5.oe1 | 5.0.1-5.oe1 |
gawkopenEuler:22.03-LTS |
before 5.1.1-5.oe2203sp2 | 5.1.1-5.oe2203sp2 |
gawkopenEuler:22.03-LTS-SP1 |
before 5.1.1-5.oe2203sp1 | 5.1.1-5.oe2203sp1 |
gawkopenEuler:22.03-LTS-SP2 |
before 5.1.1-5.oe2203sp2 | 5.1.1-5.oe2203sp2 |
gawkSUSE:Linux Enterprise Server 12 SP5 |
before 4.1.0-5.3.1 | 4.1.0-5.3.1 |
gawkSUSE:Linux Enterprise Server for SAP Applications 12 SP5 |
before 4.1.0-5.3.1 | 4.1.0-5.3.1 |
gawkSUSE:Linux Enterprise Micro 5.3 |
before 4.2.1-150000.3.3.1 | 4.2.1-150000.3.3.1 |
gawkSUSE:Linux Enterprise Micro 5.4 |
before 4.2.1-150000.3.3.1 | 4.2.1-150000.3.3.1 |
gawkSUSE:Linux Enterprise Module for Basesystem 15 SP4 |
before 4.2.1-150000.3.3.1 | 4.2.1-150000.3.3.1 |
gawkSUSE:Linux Enterprise Module for Basesystem 15 SP5 |
before 4.2.1-150000.3.3.1 | 4.2.1-150000.3.3.1 |
gawkSUSE:Manager Proxy 4.2 |
before 4.2.1-150000.3.3.1 | 4.2.1-150000.3.3.1 |
gawkSUSE:Manager Server 4.2 |
before 4.2.1-150000.3.3.1 | 4.2.1-150000.3.3.1 |
gawkSUSE:Linux Enterprise Micro 5.1 |
before 4.2.1-150000.3.3.1 | 4.2.1-150000.3.3.1 |
gawkSUSE:Linux Enterprise Micro 5.2 |
before 4.2.1-150000.3.3.1 | 4.2.1-150000.3.3.1 |
gawkopenSUSE:Leap Micro 5.3 |
before 4.2.1-150000.3.3.1 | 4.2.1-150000.3.3.1 |
gawkopenSUSE:Leap Micro 5.4 |
before 4.2.1-150000.3.3.1 | 4.2.1-150000.3.3.1 |
gawkopenSUSE:Leap 15.4 |
before 4.2.1-150000.3.3.1 | 4.2.1-150000.3.3.1 |
gawkopenSUSE:Leap 15.5 |
before 4.2.1-150000.3.3.1 | 4.2.1-150000.3.3.1 |
gawkUbuntu:Pro:14.04:LTS |
before 1:4.0.1+dfsg-2.1ubuntu2+esm1, plus listed versions 1:4.0.1+dfsg-2.1ubuntu2 |
1:4.0.1+dfsg-2.1ubuntu2+esm1 |
gawkUbuntu:Pro:16.04:LTS |
before 1:4.1.3+dfsg-0.1ubuntu0.1~esm1, plus listed versions 1:4.1.1+dfsg-11:4.1.3+dfsg-0.1 |
1:4.1.3+dfsg-0.1ubuntu0.1~esm1 |
gawkUbuntu:Pro:18.04:LTS |
before 1:4.1.4+dfsg-1ubuntu0.1~esm1, plus listed versions 1:4.1.4+dfsg-11:4.1.4+dfsg-1build1 |
1:4.1.4+dfsg-1ubuntu0.1~esm1 |
gawkUbuntu:20.04:LTS |
before 1:5.0.1+dfsg-1ubuntu0.1, plus listed versions 1:4.2.1+dfsg-1.1build11:5.0.1+dfsg-1 |
1:5.0.1+dfsg-1ubuntu0.1 |
gawkUbuntu:22.04:LTS |
before 1:5.1.0-1ubuntu0.1, plus listed versions 1:5.1.0-1build11:5.1.0-1build21:5.1.0-1build3 |
1:5.1.0-1ubuntu0.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2023-4156 is a medium vulnerability (CVSS 4.4) in Gnu Gawk, published August 8, 2023. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.41%, the 36th percentile. Fixed in gawk 5.1.1-1.
References
access.redhat.com/security/cve/CVE-2023-4156
bugzilla.redhat.com/show_bug.cgi?id=2215930
nvd.nist.gov/vuln/detail/CVE-2023-4156
github.com/advisories/GHSA-8p8g-pp68-479w
docs.bell-sw.com/security/cves/CVE-2023-4156
errata.tuxcare.com/centos7-els/CLSA-2024-1712176685.html
Show 19 moreShow less
errata.tuxcare.com/els_os/almalinux9.2esu/CLSA-2025-1751619853.html
errata.tuxcare.com/els_os/tuxcare9.6esu/CLSA-2026-1777030298.html
errata.tuxcare.com/els_os/oraclelinux7els/CLSA-2026-1777888717.html
errata.tuxcare.com/els_os/centos6els/CLSA-2026-1792508988.html
nvd.nist.gov/vuln/detail/CVE-2026-40468
nvd.nist.gov/vuln/detail/CVE-2026-40469
errata.tuxcare.com/els_os/oraclelinux6els/CLSA-2026-1792612080.html
security-tracker.debian.org/tracker/CVE-2023-4156
openeuler.org/en/security/safety-bulletin/detail.html?id=openEuler-SA-2023-1575
suse.com/support/update/announcement/2023/suse-su-20233431-1
bugzilla.suse.com/1214025
suse.com/security/cve/CVE-2023-4156
suse.com/support/update/announcement/2023/suse-su-20233440-1
ubuntu.com/security/CVE-2023-4156
mail.gnu.org/archive/html/bug-gawk/2022-08/msg00000.html
mail.gnu.org/archive/html/bug-gawk/2022-08/msg00023.html
git.savannah.gnu.org/gitweb?p=gawk.git;a=commitdiff;h=e709eb829448ce040087a3fc5481db6bfcaae212
ubuntu.com/security/notices/USN-6373-1
cve.org/CVERecord?id=CVE-2023-4156