CVSS: 10.0 (Critical)


🧠 주요 개념 정리

🔹 환경 변수 (Environment Variable)

🔹 CGI (Common Gateway Interface)


🧨 취약점 발생 구조

export x='() { :; }; echo VULNERABLE'
bash -c 'echo Safe'

🔍 Bash 내부 소스 분석

if (privmode == 0 && read_but_dont_execute == 0 &&
    STREQN("() {", string, 4)) {
    temp_string = malloc(...);
    strcpy(temp_string, name);
    strcat(temp_string, " ");
    strcat(temp_string, string);
    parse_and_execute(temp_string, name, SEVAL_NONINT|SEVAL_NOHIST);
}