Vulnerabilities in pkg:pypi/lookatme

PACKAGE
Advisory Identifier: GHSA-c84h-w6cr-5v8q
Advisory Summary

CVE-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.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/lookatme

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/lookatme. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-c84h-w6cr-5v8q CVE-2020-15271 CRITICAL Markdown-supplied Shell Command Execution

CVE-2020-15271 at a Glance

CVE Identifier CVE-2020-15271
GHSA Identifier GHSA-c84h-w6cr-5v8q
Severity CRITICAL
CVSS v3.1 Base Score 9.3
CWE Classification CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Affected Product Lookatme
Package Ecosystem PyPI
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (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.

lookatme fixed: 2.3.0
pip install lookatme>=2.3.0
Verify Direct and Transitive Dependencies

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

### Impact lookatme 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. ### Patches Users should upgrade to lookatme versions 2.3.0 or above. ### Workarounds The `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. ### References * https://github.com/d0c-s4vage/lookatme/pull/110 * https://github.com/d0c-s4vage/lookatme/releases/tag/v2.3.0 ### For more information If you have any questions or comments about this advisory: * Open an issue in [d0c-s4vage/lookatme](https://github.com/d0c-s4vage/lookatme)

CVE-2020-15271 Affected Lookatme Versions

1 component(s)
Fixed Versions:
2.3.0
Product / Package Ecosystem Affected Versions Fixed Version
lookatme
PyPI
< 2.3.0
2.3.0

References

Frequently Asked Questions

What is CVE-2020-15271?
CVE-2020-15271 is a security vulnerability in Lookatme involving Markdown-supplied Shell Command Execution under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
Which Lookatme versions are affected?
Affected versions include releases prior to 2.3.0 across affected packages: lookatme.
What version fixes CVE-2020-15271?
Upgrading to 2.3.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is lookatme affected?
Yes, lookatme is affected in releases prior to 2.3.0. Upgrade your dependency to 2.3.0 or later.
What is the CVSS score of CVE-2020-15271?
CVE-2020-15271 has a CVSS v3.1 base score of 9.3 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N.
What CWE is associated with CVE-2020-15271?
CVE-2020-15271 is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') (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.).
How can I check PyPI dependencies for CVE-2020-15271?
Run the dependency tree command: 'pip show lookatme'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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
  }
}