T05 · Unauthorized Access and Privilege Escalation
- Location
src/odoo_listener.py:220- Finding
Unauthorized Odoo Operations Through Unrestricted Discuss Channel Commands
- Content
View full analysis
https?://\S+).*?a\s+(?P[\d.,]+).*?en\s+(?P.+)", clean_text, re.IGNORECASE | re.DOTALL ) if smart_match: logger.info("🧠 Comando SMART detectado") url = smart_match.group('url') url = url.split('"')[0].split('<')[0] price = smart_match.group('price').replace(',', '.') category = smart_match.group('category').strip() name, description = extract_metadata(url) qty = 0 qty_match = re.search( r"(?:con|x)\s*(?P\d+)\s*(?:u\.|unidades|stock|uds)?", clean_text, re.IGNORECASE ) if qty_match: qty = int(qty_match.group('qty')) manager_cmd = ( f"add_product --name {shlex.quote(name)} --price {price} --qty {qty} " f"--category {shlex.quote(category)} --image-url {shlex.quote(img_url)} " f"--extra-images {shlex.quote(extra_images_str)} " f"--description {shlex.quote(description)}" ) response_text = run_manager_tool(manager_cmd) keywords_found = True ``` It also permits stock modification: ```python stock_match = re.search( r"(?:ajusta|pon|cambia|actualiza)\s+stock\s+(?:de\s+)?(?P.+?)\s+a\s+(?P\d+)", clean_text, re.IGNORECASE ) if stock_match and not keywords_found: ref = stock_match.group('ref').strip() qty = stock_match.group('qty') cmd = f"update_stock --ref {shlex ...[truncated 2282 chars]- Remediation
View remediation
