Skip to content
Submit incident
AII-1001-87693
ReportedReported by fewer than three independent publishers, with no official finding.Supporting sources are pending verification.

InternLM LMDeploy code injection via unsafe exec in conf.py

A code injection vulnerability was reported in InternLM's LMDeploy project in its conf.py file, which uses unsafe exec and compile functions to execute version.py. An attacker could exploit this by tampering with the version file to inject malicious code.

14 March 2025 Β· InternLM Β· Security and cyberattacks
14 March 2025
AII-1001-87693
Quick facts
Organization
InternLM (subject)
Category
Security and cyberattacks
Country
China
Date
14 March 2025
Drafted by
Raidu Incident Detection

What happened

Code in lmdeploy/docs/en/conf.py uses exec and compile functions to read and execute a version.py file without validation. The vulnerable code reads a file with open(version_file, 'r') and then executes it using exec(compile(f.read(), version_file, 'exec')).

The vulnerability affects all versions from August 2023 to January 2025. An attacker who tampers with the version.py file could inject malicious code to delete files, execute unauthorized system commands, or steal sensitive information.

Classification

Organization
InternLM (subject)
Category
Security and cyberattacks
Industry
IT infrastructure and hosting
Country
China
Harm status
Potential harm
Intent
Unintentional
Timing
Pre-deployment
Consequences
None recorded
AI systems
LMDeploy

Sources and evidence

Sources not yet published

This record was researched and written by the Index from original reporting. Its sources are still being verified by an editor, and they are listed here once that check is complete. Until then the record carries no reviewer.

How sources are verifiedSuggest a source for this incident