Security advisory
GNU Bison before 3.7.1 has a use-after-free in _obstack_free in lib/obstack.c (called from gram_lex) when a '\0' byte is encountered. NOTE: there is a risk only if Bison is used with untrusted input, and the observed bug happens to cause unsafe behavior with a specific compiler/architecture. The bug report was intended to show that a crash may occur in Bison itself, not that a crash may occur in code that is generated by Bison.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2020-24240
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 12:36 UTC · Revision 1
Source evidence
GNU Bison before 3.7.1 has a use-after-free in _obstack_free in lib/obstack.c (called from gram_lex) when a '\0' byte is encountered. NOTE: there is a risk only if Bison is used with untrusted input, and the observed bug happens to cause unsafe behavior with a specific compiler/architecture. The bug report was intended to show that a crash may occur in Bison itself, not that a crash may occur in code that is generated by Bison.
osv:CVE-2020-24240
Complete source record
{
"id": "cabd61fa218d1f7fd481b7751636875d06e38e3f152889cf8bdcbe7fb9b30c60",
"url": "https://osv.dev/vulnerability/CVE-2020-24240",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "CVE-2020-24240",
"summary": "GNU Bison before 3.7.1 has a use-after-free in _obstack_free in lib/obstack.c (called from gram_lex) when a '\\0' byte is encountered. NOTE: there is a risk only if Bison is used with untrusted input, and the observed bug happens to cause unsafe behavior with a specific compiler/architecture. The bug report was intended to show that a crash may occur in Bison itself, not that a crash may occur in code that is generated by Bison.",
"evidence": "osv:CVE-2020-24240",
"products": [],
"severity": "medium",
"structured": {
"id": "CVE-2020-24240",
"aliases": [
"CVE-2020-24240"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/akimd/bison",
"type": "GIT",
"events": [
{
"introduced": "6675d36e2531f2573dcb8944bd9877214677e151"
},
{
"last_affected": "6675d36e2531f2573dcb8944bd9877214677e151"
},
{
"fixed": "be95a4fe2951374676efc9454ffee8638faaf68d"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:gnu:bison:3.7:*:*:*:*:*:*:*",
"range": [
{
"introduced": "3.7"
},
{
"last_affected": "3.7"
}
],
"source": "CPE_STRING"
},
{
"range": [
{
"fixed": "be95a4fe2951374676efc9454ffee8638faaf68d"
}
],
"source": "REFERENCES_COMMIT"
}
]
}
}
],
"versions": [
"3.7",
"v3.7"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2020-24240.json",
"vanir_signatures": [
{
"id": "CVE-2020-24240-85d57cd5",
"digest": {
"threshold": 0.9,
"line_hashes": [
"152892177091449443900596977177214106375",
"110470093975942762776580447940415453127",
"8556976720912662219078527567889747895"
]
},
"source": "https://github.com/akimd/bison/commit/be95a4fe2951374676efc9454ffee8638faaf68d",
"target": {
"file": "src/flex-scanner.h"
},
"deprecated": false,
"signature_type": "Line",
"signature_version": "v1"
}
],
"vanir_signatures_modified": "2026-10-20T13:56:57Z"
}
}
],
"modified": "2026-10-20T13:56:57.467927917Z",
"provider": "osv",
"references": [
"https://github.com/akimd/bison/compare/v3.7...v3.7.1",
"https://lists.gnu.org/r/bug-bison/2020-07/msg00051.html",
"https://github.com/akimd/bison/commit/be95a4fe2951374676efc9454ffee8638faaf68d"
],
"provider_metadata": {}
},
"related_cves": [
{
"value": "CVE-2020-24240",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 388441,
"published_at": "2020-08-25T14:15:16.543+00:00"
}