Every CVE Search/ Get API key

CVE-2023-4156

Heap out of bound read in builtin.c

4.4 MediumFix available

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

0.41%Up 0.4 points since Sep 26, 2023
90%50%10%1%

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 MediumCVSS: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 MediumCVSS: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 MediumCVSS: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 MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:L
CVSS 3.1
7.1 HighCVSS: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 HighCVSS: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 HighCVSS: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 HighCVSS: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 HighCVSS: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 LowCVSS: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 HighCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H
CVSS 3.1
4.4 MediumCVSS: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

Affected packages
PackageAffectedFixed
gawk
Azure Linux:2
before 5.1.1-1
5.1.1-1
gawk
TuxCare:CentOS:7
before 4.0.2-4.el7_3.1.tuxcare.els1
4.0.2-4.el7_3.1.tuxcare.els1
gawk
TuxCare:AlmaLinux:9.2
before 5.1.0-6.el9.tuxcare.els1
5.1.0-6.el9.tuxcare.els1
gawk-all-langpacks
TuxCare:AlmaLinux:9.2
before 5.1.0-6.el9.tuxcare.els1
5.1.0-6.el9.tuxcare.els1
gawk-devel
TuxCare:AlmaLinux:9.2
before 5.1.0-6.el9.tuxcare.els1
5.1.0-6.el9.tuxcare.els1
gawk-doc
TuxCare:AlmaLinux:9.2
before 5.1.0-6.el9.tuxcare.els1
5.1.0-6.el9.tuxcare.els1
gawk
TuxCare:AlmaLinux:9.6
before 5.1.0-6.el9.tuxcare.els1
5.1.0-6.el9.tuxcare.els1
gawk-all-langpacks
TuxCare:AlmaLinux:9.6
before 5.1.0-6.el9.tuxcare.els1
5.1.0-6.el9.tuxcare.els1
gawk-devel
TuxCare:AlmaLinux:9.6
before 5.1.0-6.el9.tuxcare.els1
5.1.0-6.el9.tuxcare.els1
gawk-doc
TuxCare:AlmaLinux:9.6
before 5.1.0-6.el9.tuxcare.els1
5.1.0-6.el9.tuxcare.els1
Show 30 moreShow less
Affected packages
PackageAffectedFixed
gawk
TuxCare:OracleLinux:7
before 4.0.2-4.el7_3.1.tuxcare.els1
4.0.2-4.el7_3.1.tuxcare.els1
gawk
TuxCare: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
gawk
TuxCare: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
gawk
Debian:12
before 1:5.2.1-1
1:5.2.1-1
gawk
Debian:13
before 1:5.2.1-1
1:5.2.1-1
gawk
Debian:14
before 1:5.2.1-1
1:5.2.1-1
gawk
openEuler:20.03-LTS-SP1
before 5.0.1-5.oe1
5.0.1-5.oe1
gawk
openEuler:20.03-LTS-SP3
before 5.0.1-5.oe1
5.0.1-5.oe1
gawk
openEuler:22.03-LTS
before 5.1.1-5.oe2203sp2
5.1.1-5.oe2203sp2
gawk
openEuler:22.03-LTS-SP1
before 5.1.1-5.oe2203sp1
5.1.1-5.oe2203sp1
gawk
openEuler:22.03-LTS-SP2
before 5.1.1-5.oe2203sp2
5.1.1-5.oe2203sp2
gawk
SUSE:Linux Enterprise Server 12 SP5
before 4.1.0-5.3.1
4.1.0-5.3.1
gawk
SUSE:Linux Enterprise Server for SAP Applications 12 SP5
before 4.1.0-5.3.1
4.1.0-5.3.1
gawk
SUSE:Linux Enterprise Micro 5.3
before 4.2.1-150000.3.3.1
4.2.1-150000.3.3.1
gawk
SUSE:Linux Enterprise Micro 5.4
before 4.2.1-150000.3.3.1
4.2.1-150000.3.3.1
gawk
SUSE:Linux Enterprise Module for Basesystem 15 SP4
before 4.2.1-150000.3.3.1
4.2.1-150000.3.3.1
gawk
SUSE:Linux Enterprise Module for Basesystem 15 SP5
before 4.2.1-150000.3.3.1
4.2.1-150000.3.3.1
gawk
SUSE:Manager Proxy 4.2
before 4.2.1-150000.3.3.1
4.2.1-150000.3.3.1
gawk
SUSE:Manager Server 4.2
before 4.2.1-150000.3.3.1
4.2.1-150000.3.3.1
gawk
SUSE:Linux Enterprise Micro 5.1
before 4.2.1-150000.3.3.1
4.2.1-150000.3.3.1
gawk
SUSE:Linux Enterprise Micro 5.2
before 4.2.1-150000.3.3.1
4.2.1-150000.3.3.1
gawk
openSUSE:Leap Micro 5.3
before 4.2.1-150000.3.3.1
4.2.1-150000.3.3.1
gawk
openSUSE:Leap Micro 5.4
before 4.2.1-150000.3.3.1
4.2.1-150000.3.3.1
gawk
openSUSE:Leap 15.4
before 4.2.1-150000.3.3.1
4.2.1-150000.3.3.1
gawk
openSUSE:Leap 15.5
before 4.2.1-150000.3.3.1
4.2.1-150000.3.3.1
gawk
Ubuntu: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
gawk
Ubuntu: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
gawk
Ubuntu: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
gawk
Ubuntu: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
gawk
Ubuntu: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

History
RecordedChangedSources
affected, facts
aliasesEUVD
first indexedCVE 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

Show 19 moreShow less
MoveEnter Open