CVE-2012-3365

PHP < 5.3.15 - open_basedir Protection Bypass via SQLite Functionality

Title source: llm
STIX 2.1

Exploitation Summary

EIP tracks 1 public exploit for CVE-2012-3365. PoCs published by BlackFan.

AI-analyzed exploit summary This PoC demonstrates an open_basedir bypass in PHP versions prior to 5.3.15 by leveraging SQLite3's handling of the ':memory:' database path to write a PHP shell outside the restricted directory. The exploit creates a malicious PHP file by abusing SQLite's file path resolution.

Description

The SQLite functionality in PHP before 5.3.15 allows remote attackers to bypass the open_basedir protection mechanism via unspecified vectors.

Exploits (1)

github WORKING POC 21 stars
by BlackFan · poc
https://github.com/BlackFan/CVE_PoCs/tree/master/CVE-2012-3365 (PHP)

This PoC demonstrates an open_basedir bypass in PHP versions prior to 5.3.15 by leveraging SQLite3's handling of the ':memory:' database path to write a PHP shell outside the restricted directory. The exploit creates a malicious PHP file by abusing SQLite's file path resolution.

Classification
Working Poc 95%
Attack Type
Auth Bypass
Complexity
Trivial
Reliability
Reliable
Target: PHP < 5.3.15
No auth needed
Prerequisites: PHP with SQLite3 extension enabled · open_basedir restriction in place
devstral-2 · analyzed Feb 27, 2026 Full analysis →

References (10)

Core 10
Core References
Third Party Advisory, VDB Entry vdb-entry x_refsource_sectrack
http://www.securitytracker.com/id?1027286
Various Sources vendor-advisory x_refsource_suse
https://hermes.opensuse.org/messages/15376003
Third Party Advisory third-party-advisory x_refsource_secunia
http://secunia.com/advisories/51178
Third Party Advisory, VDB Entry vdb-entry x_refsource_bid
http://www.securityfocus.com/bid/54612
Third Party Advisory third-party-advisory x_refsource_secunia
http://secunia.com/advisories/49969
Vendor Advisory x_refsource_confirm
http://www.php.net/ChangeLog-5.php
Third Party Advisory, VDB Entry vdb-entry x_refsource_osvdb
http://osvdb.org/84100
Vendor Advisory vendor-advisory x_refsource_mandriva
http://www.mandriva.com/security/advisories?name=MDVSA-2012:108

Scores

EPSS 0.0298
EPSS Percentile 85.5%

Details

CWE
CWE-264
Status published
Products (46)
php/php 1.0
php/php 2.0
php/php 2.0b10
php/php 3.0
php/php 3.0.1
php/php 3.0.2
php/php 3.0.3
php/php 3.0.4
php/php 3.0.5
php/php 3.0.6
... and 36 more
Published Jul 20, 2012
Tracked Since Feb 18, 2026