Goal Reached Thanks to every supporter β€” we hit 100%!

Goal: 1000 CNY Β· Raised: 1000 CNY

100.0%

CVE-2021-35042 β€” AI Deep Analysis Summary

Q1What is this vulnerability? (Essence + Consequences)

🚨 **Essence**: Django's `QuerySet.order_by()` allows SQL injection via unsanitized user input. πŸ“‰ **Consequences**: Attackers bypass column validation in deprecated paths, leading to potential data theft or manipulation.

Q2Root Cause? (CWE/Flaw)

πŸ›‘οΈ **Root Cause**: CWE-89 (SQL Injection). The framework fails to validate user-controlled input passed to `order_by()`, allowing raw SQL references to slip through.

Q3Who is affected? (Versions/Components)

πŸ“¦ **Affected**: Django versions **3.1.x (up to 3.1.13)** and **3.2.x (up to 3.2.5)**. Python-based Web Application Frameworks using these versions.

Q4What can hackers do? (Privileges/Data)

πŸ’€ **Hacker Power**: Full SQL injection capabilities. Attackers can read, modify, or delete database records. They can potentially escalate privileges by executing arbitrary SQL commands.

Q5Is exploitation threshold high? (Auth/Config)

⚑ **Threshold**: **LOW**. No authentication required. Exploitation is as simple as injecting parameters into the URL query string (e.g., `?order_by=...`).

Q6Is there a public Exp? (PoC/Wild Exploitation)

πŸ”“ **Public Exp?**: **YES**. Multiple PoCs exist on GitHub (e.g., YouGina, mrlihd). Wild exploitation is possible via simple URL manipulation.

Q7How to self-check? (Features/Scanning)

πŸ” **Self-Check**: Scan for Django versions < 3.1.13 or < 3.2.5. Look for endpoints using `order_by` with user-controllable parameters. Test with SQL payloads in URL params.

Q8Is it fixed officially? (Patch/Mitigation)

βœ… **Fixed?**: **YES**. Official security releases were published on July 1, 2021. Patched in Django 3.1.14+ and 3.2.6+.

Q9What if no patch? (Workaround)

πŸ›‘ **No Patch?**: **Workaround**: Strictly whitelist allowed column names for `order_by()`. Never pass raw user input directly to the `order_by()` function.

Q10Is it urgent? (Priority Suggestion)

πŸ”₯ **Urgency**: **HIGH**. Critical SQL injection with easy exploitation. Immediate patching or mitigation is required to prevent data breaches.