Web Niraj
  • Facebook
  • Flickr
  • Github
  • Instagram
  • Linkedin
  • Twitter
  • YouTube
Online portfolio, code examples and developer blog
  • About
  • Contact
  • Portfolio
  • WordPress
  • Apps
    • Gemini Quota App for macOS
Search the site...
  • Home
  • Blog
  • New Vulnerability Found in Bash and How to Test

New Vulnerability Found in Bash and How to Test

0

A critical vulnerability has been found in Bash, which affects almost all Linux/Unix distributions that use or have it installed. Luckily, there is a easy way to test to see if your version is vulnerable using a command line. Depending on your version of Linux, a patch may already be available and ready to install. Others way take a few days to issue a fix for your system.

For more information, see the following notice:

CVE-2014-6271, Bash Code Injection Vulnerability via Specially Crafted Environment Variables.

Testing for vulnerability

To test if your version of Bash is vulnerable to this issue, run the following command:

env x='() { :;}; echo vulnerable' bash -c "echo this is a test"
view raw basb_test.sh hosted with ❤ by GitHub

If you see the following output, your version is vulnerable and should be patched immediately:

Bash Vunerable

If you see the following, your version is safe and unaffected:

Bash Safe

Patching

To update your version of bash, you can use one of the following commands:

# Ubuntu using apt-get
sudo apt-get install --only-upgrade bash
# CentOS, Red Hat etc using yum
sudo yum update bash
view raw bash_update.sh hosted with ❤ by GitHub

I’ve found that even the Mac OS X version of bash is vulnerable and needs to be patched. For this, you’ll need to wait for Apple to issue an update for the OS itself.

Bash Mac OS X Version Vulnerable


UPDATE:

Apple has released a downloadable patch to update Bash on Mac OS X Mavericks (v10.9.5). The patch is also available for older versions of Mac OS X including OS X Lion v10.7.5, OS X Lion Server v10.7.5, and OS X Mountain Lion v10.8.5.

Bash, Facebook, Linux, Mac OS, Security, Server

Leave a Reply Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

StackExchange / StackOverflow

profile for Niraj Shah on Stack Exchange, a network of free, community-driven Q&A sites

Subscribe for updates

Support Me

Buy Me a Coffee

PSN Profile

Tags

ACL Amazon Web Services Android Android 4.4 KitKat Android 5.0 Lollipop Apache Backup Bug Command Line Cordova cPanel / WHM Facebook Facebook Graph API Facebook PHP SDK 4.0 Facebook Social Plugins Fan Page Flash Flat File Geolocation Google Nexus 5 Hacking HTML5 iOS JavaScript jQuery Laravel 5 Linux Mac OS MongoDB NodeJS Parse PDF PHP Plugin Portfolio PS4 Review Security Server SSH SSL Sysadmin Tutorial WordPress WordPress Plugins

© 2011-2026 Niraj Shah
  • Blog
  • Portfolio
  • WordPress
  • About Me
  • Contact Me
  • Privacy Policy