{"id":"GHSA-j9m2-6hq2-4r3c","summary":"Cross-site Scripting in invenio-previewer","details":"## Cross-Site Scripting (XSS) vulnerability in JSON, Markdown and iPython Notebook previewers\n\n### Impact\nSeveral Cross-Site Scripting (XSS) vulnerabilities have been found in the JSON, Markdown and iPython Notebook previewers. The vulnerabilities would allow a malicous user to upload a JSON, Markdown or Notebook file with embedded scripts that would be executed by a victims browser.\n\n### Patches\nInvenio-Previewer v1.0.0a12 fixes the issue.\n\n### Workarounds\nYou can remediate the vulnerability without upgrading by disabling the affected previewers. You do this by adding the following to your configuration:\n\n```python\nPREVIEWER_PREFERENCE = [\n    'csv_dthreejs',\n    'simple_image',\n    # 'json_prismjs',\n    'xml_prismjs',\n    # 'mistune',\n    'pdfjs',\n    # 'ipynb',\n    'zip',\n]\n```\n\nAfterwards, you should not be able to preview JSON, Markdown or iPython Notebook files.\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Email us at [info@inveniosoftware.org](mailto:info@inveniosoftware.org)","aliases":["CVE-2019-1020019","PYSEC-2019-26"],"modified":"2026-09-10T03:47:55.087537191Z","published":"2019-07-16T00:52:22Z","database_specific":{"severity":"MODERATE","github_reviewed":true,"github_reviewed_at":"2020-06-16T21:42:56Z","nvd_published_at":null,"cwe_ids":["CWE-79"]},"references":[{"type":"WEB","url":"https://github.com/inveniosoftware/invenio-previewer/security/advisories/GHSA-j9m2-6hq2-4r3c"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2019-1020019"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-j9m2-6hq2-4r3c"},{"type":"PACKAGE","url":"https://github.com/inveniosoftware/invenio-previewer"},{"type":"WEB","url":"https://github.com/pypa/advisory-database/tree/main/vulns/invenio-previewer/PYSEC-2019-26.yaml"}],"affected":[{"package":{"name":"invenio-previewer","ecosystem":"PyPI","purl":"pkg:pypi/invenio-previewer"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.0.0a12"}]}],"versions":["0.1.0","1.0.0a10","1.0.0a11","1.0.0a2","1.0.0a3","1.0.0a4","1.0.0a5","1.0.0a6","1.0.0a7","1.0.0a8","1.0.0a9"],"database_specific":{"last_known_affected_version_range":"\u003c= 1.0.0a11","source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2019/07/GHSA-j9m2-6hq2-4r3c/GHSA-j9m2-6hq2-4r3c.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/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:L/SI:L/SA:N"}]}