CVE-2011-4066

high
Published 2011-11-04 ยท Modified 2026-04-29
CVSS v3
โ€”
CVSS v4 NEW
โ€”
not yet in upstream
VIR risk
8.5

Description

SQL injection vulnerability in bbs/tb.php in Gnuboard 4.33.02 and earlier allows remote attackers to execute arbitrary SQL commands via the PATH_INFO.

Predictions

Exploit likelihood
20%
Patch ETA
โ€”

Heuristic predictions, AS-IS, for prioritization only.

Mitigations

No mitigations published for this CVE yet.

The vendor-content worker queues fetches as references arrive (check back in a few minutes). Or โ€” if you've already worked around this in production โ€” publish your fix to the community-verified tier.

โœš Propose a mitigation on Community โ†’ Mitigations published via the community go through AI scoring + 2 human reviewers + 7-day silent objection window before landing here with source_tier=community-verified.

Exploits

Public proof-of-concept code below. AS-IS, for defenders and authorised testing only.

Exploit-DB

EDB-17992 webapps php text ยท 2 KB
flyh4t ยท 2011-10-17

GNUBoard 4.33.02 - 'tp.php?PATH_INFO' SQL Injection

text exploit Source: Exploit-DB
# Exploit Title: Gnuboard <= 4.33.02 PATH_INFO SQL INJECTION Vulnerability
# Google Dork: inurl:gnuboard4/bbs/board.php
# Date: 2011-2-14
# Author: flyh4t
# Software Link: http://sir.co.kr/main/gnuboard4/
# Version: Gnuboard <= 4.33.02
# Tested on: linux+apache
# CVE : CVE-2011-4066


Gnuboard <= 4.33.02 PATH_INFO SQL INJECTION Vulnerability
---------------------------------
Bug found By Flyh4t & alpha.liu
mail:
flyh4t phpsec@hotmail.com
alpha  alpha@patching.net
Site:bbs.wolvez.org
---------------------------------
SIR GNUBoard(http://sir.co.kr) is a widely used bulletin board system of Korea.  
It is freely available for all platforms that supports PHP and MySQL.  
But we find a SQL INJECTION affects SIR GNUBoard version 4.33.02 
The codes can be download here
http://sir.co.kr/main/gnuboard4/
Here is the Vulnerability code in /bbs/tb.php
 
-----------------------vul code-------------------
//bbs/tb.php
$arr = explode("/", $_SERVER[PATH_INFO]);
//$_SERVER[PATH_INFO] is not affected by the magic_quotes_gpc set of php
//we can inject arbitrary sql code include single quotes through $_SERVER[PATH_INFO] 
$bo_table = $arr[1];
$wr_id = $arr[2];
$to_token = $arr[3];
//we can pass arbitrary sql code to $bo_table 
$write_table   = $g4[write_prefix] . $bo_table;
// $write_table can be injected through $bo_table
$sql = " select wr_id, ca_name, wr_email from $write_table where wr_id = '$wr_id' ";
//here $write_table lead to sql injection,and no need of  single quotes
$wr = sql_fetch($sql, FALSE);
if (!$wr[wr_id] || !($_POST[title] && $_POST[excerpt] && $_POST[url] && $_POST[blog_name])) 
{
    $tmp_dir = str_replace("/tb.php", "", $_SERVER[SCRIPT_NAME]);
    header("location:$tmp_dir/board.php?bo_table=$bo_table&wr_id=$wr_id");
    exit;
}
-----------------------vul code end-------------------

-----------------------poc------------------------
bbs/tb.php/[sql]/[sql]
--------------------------------------------------

Application impact

VendorProductVersionsFixed
sirgnuboard{"endIncluding":"4.33.02"}
sirgnuboard3.30
sirgnuboard3.31
sirgnuboard3.32
sirgnuboard3.33
sirgnuboard3.34
sirgnuboard3.35
sirgnuboard3.36
sirgnuboard3.37
sirgnuboard3.38
sirgnuboard3.39
sirgnuboard3.40
sirgnuboard4.31.03

References

CWEs

CWE-89

Community-verified mitigations for this CVE will appear above when contributors publish them.

Verify integrity in audit chain (admin only). AS-IS.