Off-by-one error in bash (Alpine package)



Published: 2014-10-02
Risk Critical
Patch available YES
Number of vulnerabilities 1
CVE-ID CVE-2014-7187
CWE-ID CWE-193
Exploitation vector Network
Public exploit This vulnerability is being exploited in the wild.
Vulnerable software
Subscribe
bash (Alpine package)
Operating systems & Components / Operating system package or component

Vendor Alpine Linux Development Team

Security Bulletin

This security bulletin contains one critical risk vulnerability.

1) Off-by-one error

EUVDB-ID: #VU5328

Risk: Critical

CVSSv3.1: 9.3 [CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H/E:F/RL:O/RC:C]

CVE-ID: CVE-2014-7187

CWE-ID: CWE-193 - Off-by-one Error

Exploit availability: Yes

Description

The vulnerability allows a remote attacker to execute arbitrary code on the target system.

The weakness exists due to off-by-one-error when handling deeply nested flow control constructs. A remote attacker can trigger memory corruption and execute arbitrary code with privileges of the current user.

Exploitation example:

(for x in {1..200} ; do echo "for x$x in ; do :"; done; for x in {1..200} ; do echo done ; done) | bash ||
echo "CVE-2014-7187 vulnerable, word_lineno"

Successful exploitation results in arbitrary code execution on the vulnerable system.

Note: this vulnerability was being actively exploited.


Mitigation

Install update from vendor's website.

Vulnerable software versions

bash (Alpine package): 4.2.050-r0

CPE2.3 External links

http://git.alpinelinux.org/aports/commit/?id=c5620781d3e7f795abf791b2141830d90835c255
http://git.alpinelinux.org/aports/commit/?id=5eb71d2da76922363cee1f48af6452c6be607b0e
http://git.alpinelinux.org/aports/commit/?id=8f16f06990c6cf37335a37903d8907f4078a9b38
http://git.alpinelinux.org/aports/commit/?id=2fb12d286710e300e1793ecbce11a548beda713b


Q & A

Can this vulnerability be exploited remotely?

Yes. This vulnerability can be exploited by a remote non-authenticated attacker via the Internet.

Is there known malware, which exploits this vulnerability?

No. We are not aware of malware exploiting this vulnerability. However, a fully functional exploit for this vulnerability is available.



###SIDEBAR###