Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-112140 Overview
CVE-2026-112140 is a code injection vulnerability in the llSourcell Doctor-Dignity project, an open-source medical AI chatbot. The flaw affects the _get_lib_module function in python/mlc_chat/chat_module.py. Attackers can manipulate the model_lib argument to inject and execute arbitrary code. The weakness is classified as [CWE-74] (Improper Neutralization of Special Elements in Output Used by a Downstream Component). Doctor-Dignity follows a rolling release model, so no fixed version is published. The maintainer was notified via a GitHub issue but has not yet responded. A proof-of-concept has been published publicly.
Critical Impact
Successful exploitation requires user interaction but allows remote code injection into a Python process running the Doctor-Dignity chat module, with limited confidentiality, integrity, and availability impact.
Affected Products
- llSourcell Doctor-Dignity (all commits up to 3f2ffb6c892f13b50a708d05900d3227acb40ded)
- python/mlc_chat/chat_module.py — _get_lib_module function
- Rolling release distribution (no versioned releases published)
Discovery Timeline
- 2026-10-19 - CVE-2026-112140 published to NVD
- 2026-10-19 - Last updated in NVD database
Technical Details for CVE-2026-112140
Vulnerability Analysis
The vulnerability resides in the _get_lib_module helper inside python/mlc_chat/chat_module.py. The function processes a caller-supplied model_lib argument without adequate neutralization of special elements. An attacker who can influence this argument can cause the Python runtime to load or execute attacker-controlled code paths. Because Doctor-Dignity is a locally hosted AI chat application, exploitation depends on inducing a user to load a malicious model specification or configuration. The project maintainer has not acknowledged the GitHub issue reporting this flaw, and no patch is available.
Root Cause
The root cause is improper input neutralization in a downstream component [CWE-74]. The model_lib parameter is consumed by code that resolves and loads a library module, but the application does not validate the value against an allow-list of trusted module paths or sanitize characters that alter the resolution logic. This allows attacker-controlled input to steer module loading toward arbitrary code.
Attack Vector
The attack is launched over the network but requires user interaction, such as opening a crafted model manifest, configuration file, or chat invocation that passes a malicious model_lib value. Once the Python process reaches _get_lib_module with the tainted argument, injected code executes in the context of the user running Doctor-Dignity. A proof-of-concept archive is publicly available via the project's GitHub issue tracker.
No verified exploit code is reproduced here. See the GitHub Issue #37 for Doctor Dignity and the GitHub PoC File Attachment for technical details.
Stop Remote Code Execution Before It Runs
Singularity™ Endpoint detects and blocks exploit attempts at machine speed, including zero-days and novel attack techniques.
Stop Exploit AttemptsDetection Methods for CVE-2026-112140
Indicators of Compromise
- Unexpected child processes spawned by the Python interpreter hosting mlc_chat.
- Loading of Python modules from paths outside the Doctor-Dignity install directory or standard site-packages.
- Configuration files or model manifests containing shell metacharacters, path separators, or Python expressions in the model_lib field.
Detection Strategies
- Instrument the _get_lib_module call path with logging that records every resolved model_lib value before import.
- Compare resolved module paths against an allow-list of expected MLC compiled libraries.
- Monitor outbound network connections from the Python process, which should normally be minimal for a local chat model.
Monitoring Recommendations
- Capture EDR process telemetry for the Python runtime running Doctor-Dignity and alert on unexpected exec, eval, or subprocess activity.
- Forward application logs and host telemetry to a centralized data lake for correlation and retroactive hunting across the fleet.
- Hash and inventory downloaded model artifacts to detect tampering or substitution.
How to Mitigate CVE-2026-112140
Immediate Actions Required
- Treat all model_lib inputs as untrusted and refuse values that are not absolute paths within an approved directory.
- Do not load Doctor-Dignity model manifests sourced from untrusted repositories, chat sessions, or users.
- Run the Doctor-Dignity process under a least-privilege account isolated from sensitive data and credentials.
Patch Information
No vendor patch is currently available. The project uses a rolling release model and the maintainer has not responded to GitHub Issue #37 for Doctor Dignity. Track the upstream GitHub Project: Doctor Dignity repository for commits that modify _get_lib_module in python/mlc_chat/chat_module.py. Additional tracking details are available at VulDB CVE-2026-112140 Details.
Workarounds
- Wrap _get_lib_module with a validator that enforces an allow-list of permitted library file names and rejects any value containing path traversal sequences or shell metacharacters.
- Deploy Doctor-Dignity inside a container or sandbox with read-only mounts for model directories and no outbound network access.
- Apply AppArmor, SELinux, or seccomp profiles to restrict the Python interpreter from executing shells or writing to sensitive paths.
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

