Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2025-14177 — PHP getimagesize() CVE-2025-14177 - Heap Memory Leak Exploit Generator Fully functional exploit chain in Python | Kitploit
Tools/GitHubGitHub/34zy/cve-2025-14177
Payload GenerationVulnerability AnalysisExploitationWeb SecurityPenetration TestingBinary Exploitation
GitHub34zy/cve-2025-14177

CVE-2025-14177

PHP getimagesize() CVE-2025-14177 - Heap Memory Leak Exploit Generator Fully functional exploit chain in Python

View Repository
34 months agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2025-14177 — PHP getimagesize() Heap Memory Leak

For authorized penetration testing and security research only.

Vulnerability

FieldValue
CVECVE-2025-14177
CWECWE-524 (Use of Uninitialized Resource)
SeverityMODERATE — CVSS 6.3
Root causephp_read_stream_all_chunks() writes successive chunks to buffer[0], overwriting previous data with uninitialized heap memory

Affected versions

  • PHP < 8.1.34
  • PHP < 8.2.30
  • PHP < 8.3.29
  • PHP < 8.4.16
  • PHP < 8.5.1

Fixed in

  • PHP 8.1.34 / 8.2.30 / 8.3.29 / 8.4.16 / 8.5.1

Bug mechanics

getimagesize("php://filter/.../resource=malicious.jpg", $info)
    └─ php_read_stream_all_chunks()
        ├─ Chunk 1 (8KB) → memcpy(buffer+0, chunk1, 8192)
        ├─ Chunk 2 (8KB) → memcpy(buffer+0, chunk2, 8192)  ← overwrites!
        └─ $info['APP1'] = chunk2 + uninitialized heap garbage

Malicious JPEG carries an oversized APP1 marker (16KB) to force the multi-chunk read path. The returned APP1 field leaks heap memory that may contain credentials, tokens, session data, or ASLR pointers.


Attack flow

[1] RECON      Find PHP app exposing getimagesize() output (APP1 field)
[2] PREP       Craft malicious.jpg (APP1 = 16KB)
[3] EXPLOIT    Upload → trigger getimagesize($file, $info)
[4] EXTRACT    Parse $info['APP1'] for leaked heap data
[5] IMPACT     Credential theft / token extraction / ASLR bypass

Usage

python3 CVE-2025-14177.py [mode]
ModeAction
demoFull exploit demo (default)
genGenerate malicious JPEG + PHP exploit code
testGenerate test case JSON
analyzeGenerate JPEG + simulate + analyze leak
flowPrint attack flow diagram

Output (./exploit_output/)

exploit_output/
├── malicious.jpg          # crafted JPEG payload (APP1 = 16KB)
├── exploit_standalone.php # deployable PHP exploit
├── exploit_report.json    # full analysis report
└── test_cases.json        # 3 test scenarios

Test scenarios

CaseVector
1Direct upload → getimagesize($_FILES[...], $info)
2Stream filter + LFI (php://filter/read=.../resource=...)
3Remote image URL (/preview.php?url=attacker.com/malicious.jpg)

Detection

  • Large APP1 markers in JPEG uploads (> 8192 bytes)
  • Unusual memory patterns in $info array
  • Repeated getimagesize() calls with php://filter wrappers
  • Hex-encoded data exfiltration in responses

Remediation

Upgrade PHP to patched version. No workaround — patch required.

php -v  # verify version

If upgrade blocked: strip APP1 from $info before returning to client, or disable php://filter in allow_url_fopen.


Disclaimer

This tool is for authorized security testing only. Unauthorized use against systems you do not own or have explicit written permission to test is illegal.

Download Tool