CVE-2020-15275: Moin Cross-Site Scripting Vulnerability

MODERATE
Advisory Identifier: GHSA-4q96-6xhq-ff43
CVSS 8.7
CWE-79
Published
Advisory Summary

CVE-2020-15275 is a MODERATE (CVSS 8.7) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Moin libraries in the PyPI ecosystem. The issue involves malicious svg attachment causing stored xss vulnerability. Remediation is available by upgrading affected packages to version 1.9.11.

CVE-2020-15275 at a Glance

CVE Identifier CVE-2020-15275
GHSA Identifier GHSA-4q96-6xhq-ff43
Severity MODERATE
CVSS v3.1 Base Score 8.7
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Moin
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 8.7

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
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-15275

To remediate this vulnerability, upgrade all affected Moin dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

moin fixed: 1.9.11
pip install moin>=1.9.11
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 moin

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2020-15275, inspect your installed packages using pip:

pip show moin

Analyze the terminal output to locate any version of Moin in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.9.11), your application is affected.

Note: The pip show moin command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Moin, 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 An attacker with `write` permissions can upload an SVG file that contains malicious javascript. This javascript will be executed in a user's browser when the user is viewing that SVG file on the wiki. ### Patches Users are strongly advised to upgrade to a patched version. MoinMoin Wiki 1.9.11 has the necessary fixes and also contains other important fixes. ### Workarounds It is not advised to work around this, but to upgrade MoinMoin to a patched version. That said, a work around via a Content Security Policy in the web server might be possible. Also, it is of course helpful if you give `write` permissions (which include uploading attachments) only to trusted users. ### For more information If you have any questions or comments about this advisory, email me at [twaldmann@thinkmo.de](mailto:twaldmann@thinkmo.de). ### Credits This vulnerability was discovered by: Catarina Leite from the Checkmarx SCA AppSec team

CVE-2020-15275 Affected Moin Versions

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

References

Frequently Asked Questions

What is CVE-2020-15275?
CVE-2020-15275 is a security vulnerability in Moin involving malicious SVG attachment causing stored XSS vulnerability under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Moin versions are affected?
Affected versions include releases prior to 1.9.11 across affected packages: moin.
What version fixes CVE-2020-15275?
Upgrading to 1.9.11 (or the latest patched release for your respective branch) resolves the vulnerability.
Is moin affected?
Yes, moin is affected in releases prior to 1.9.11. Upgrade your dependency to 1.9.11 or later.
What is the CVSS score of CVE-2020-15275?
CVE-2020-15275 has a CVSS v3.1 base score of 8.7 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N.
What CWE is associated with CVE-2020-15275?
CVE-2020-15275 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.).
How can I check PyPI dependencies for CVE-2020-15275?
Run the dependency tree command: 'pip show moin'. 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-4q96-6xhq-ff43",
  "modified" : "2024-10-07T15:01:08Z",
  "published" : "2020-11-11T15:54:41Z",
  "aliases" : [ "CVE-2020-15275" ],
  "summary" : "malicious SVG attachment causing stored XSS vulnerability",
  "details" : "### Impact\nAn attacker with `write` permissions can upload an SVG file that contains malicious javascript. This javascript will be executed in a user's browser when the user is viewing that SVG file on the wiki.\n\n### Patches\nUsers are strongly advised to upgrade to a patched version.\n\nMoinMoin Wiki 1.9.11 has the necessary fixes and also contains other important fixes.\n\n### Workarounds\nIt is not advised to work around this, but to upgrade MoinMoin to a patched version.\n\nThat said, a work around via a Content Security Policy in the web server might be possible.\n\nAlso, it is of course helpful if you give `write` permissions (which include uploading attachments) only to trusted users.\n\n### For more information\nIf you have any questions or comments about this advisory, email me at [twaldmann@thinkmo.de](mailto:twaldmann@thinkmo.de).\n\n### Credits\n\nThis vulnerability was discovered by:\n\nCatarina Leite from the Checkmarx SCA AppSec team",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/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:P/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "moin"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.9.11"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/moinwiki/moin-1.9/security/advisories/GHSA-4q96-6xhq-ff43"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-15275"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/moinwiki/moin-1.9/commit/31de9139d0aabc171e94032168399b4a0b2a88a2"
  }, {
    "type" : "WEB",
    "url" : "https://advisory.checkmarx.net/advisory/CX-2020-4285"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/moinwiki/moin-1.9"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/moinwiki/moin-1.9/releases/tag/1.9.11"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/moin/PYSEC-2020-241.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://pypi.org/project/moin"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-11-11T15:49:35Z",
    "nvd_published_at" : "2020-11-11T16:15:00Z"
  }
}