CVE-2020-15271: Lookatme Markdown-supplied Shell Command Execution Vulnerability
CRITICALCVE-2020-15271 is a CRITICAL (CVSS 9.3) markdown-supplied shell command execution vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting Lookatme libraries in the PyPI ecosystem. The issue involves markdown-supplied shell command execution. Remediation is available by upgrading affected packages to version 2.3.0.
CVE-2020-15271 at a Glance
Security Impact
CVSS: 9.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N).
How to Fix CVE-2020-15271
To remediate this vulnerability, upgrade all affected Lookatme dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install lookatme>=2.3.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show lookatme
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2020-15271, inspect your installed packages using pip:
pip show lookatme
Analyze the terminal output to locate any version of Lookatme in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.3.0), your application is affected.
Note: The pip show lookatme command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where the product constructs all or part of an os command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended os command when it is sent to a downstream component. In Lookatme, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2020-15271 Affected Lookatme Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
lookatme
|
PyPI |
< 2.3.0
|
2.3.0
|
References
Frequently Asked Questions
What is CVE-2020-15271?
Which Lookatme versions are affected?
What version fixes CVE-2020-15271?
Is lookatme affected?
What is the CVSS score of CVE-2020-15271?
What CWE is associated with CVE-2020-15271?
How can I check PyPI dependencies for CVE-2020-15271?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-c84h-w6cr-5v8q",
"modified" : "2024-09-30T20:15:51Z",
"published" : "2020-10-27T17:59:54Z",
"aliases" : [ "CVE-2020-15271" ],
"summary" : "Markdown-supplied Shell Command Execution",
"details" : "### Impact\n\nlookatme versions prior to 2.3.0 automatically loaded the built-in \"terminal\" and \"file_loader\" extensions. Users that use lookatme to render untrusted markdown may have malicious shell commands automatically run on their system.\n\n### Patches\n\nUsers should upgrade to lookatme versions 2.3.0 or above.\n\n### Workarounds\n\nThe `lookatme/contrib/terminal.py` and `lookatme/contrib/file_loader.py` files may be manually deleted. Additionally, it is always recommended to be aware of what is being rendered with lookatme.\n\n### References\n\n* https://github.com/d0c-s4vage/lookatme/pull/110\n* https://github.com/d0c-s4vage/lookatme/releases/tag/v2.3.0\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n\n* Open an issue in [d0c-s4vage/lookatme](https://github.com/d0c-s4vage/lookatme)",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:N/SC:H/SI:H/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "lookatme"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.3.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/d0c-s4vage/lookatme/security/advisories/GHSA-c84h-w6cr-5v8q"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-15271"
}, {
"type" : "WEB",
"url" : "https://github.com/d0c-s4vage/lookatme/pull/110"
}, {
"type" : "WEB",
"url" : "https://github.com/d0c-s4vage/lookatme/commit/72fe36b784b234548d49dae60b840c37f0eb8d84"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/d0c-s4vage/lookatme"
}, {
"type" : "WEB",
"url" : "https://github.com/d0c-s4vage/lookatme/releases/tag/v2.3.0"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/lookatme/PYSEC-2020-61.yaml"
}, {
"type" : "WEB",
"url" : "https://pypi.org/project/lookatme/#history"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-78" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2020-10-26T18:07:46Z",
"nvd_published_at" : null
}
}