Description
Multiple integer overflows in GNU Grep before 2.11 might allow context-dependent attackers to execute arbitrary code via vectors involving a long input line that triggers a heap-based buffer overflow.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | grep | 2.11-1 | — |
| Debian 13 | grep | 2.11-1 | — |
| Debian 12 | grep | 2.11-1 | — |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 6 | grep | 2.20-3.el6 | RHSA-2015:1447 |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Exploit-DB 1
- Grep < 2.11 - Integer Overflow Crash (PoC) EDB-23779 · dos · Dec 31, 2012 · verified
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Advisories 1
- RHSA-2015:1447 Red Hat Security Advisory: grep security, bug fix, and enhancement update Red Hat Security Advisories (RHSA) · Jun 28, 2026
References
- https://bugs.launchpad.net/ubuntu/+source/grep/+bug/1091473
- 57033 vdb-entry
- http://git.sv.gnu.org/gitweb/?p=grep.git%3Ba=shortlog%3Bh=v2.11
- http://git.savannah.gnu.org/cgit/grep.git/commit/?id=8fcf61523644df42e1905c81bed26838e0b04f91
- https://bugzilla.redhat.com/show_bug.cgi?id=889935
- RHSA-2015:1447 vendor-advisory
- [bug-grep] 20121217 Re: Exploit in grep.. mailing-list
- http://git.savannah.gnu.org/cgit/grep.git/commit/?id=cbbc1a45b9f843c811905c97c90a5d31f8e6c189
- [oss-security] 20121221 Re: CVE Request: grep mailing-list