Vulnerabilities in pkg:pypi/django-jsonform
PACKAGEGHSA-x9jp-4w8m-4f3c is a HIGH cross site scripting vulnerability vulnerability (CWE-80: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS)) affecting Django jsonform libraries in the PyPI ecosystem. The issue involves cross site scripting vulnerability in django-jsonform's admin form.. Remediation is available by upgrading affected packages to version 2.10.1.
pkg:pypi/django-jsonform
Vulnerability advisories affecting package pkg:pypi/django-jsonform. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-x9jp-4w8m-4f3c | - | HIGH | Cross Site Scripting vulnerability in django-jsonform's admin form. |
GHSA-x9jp-4w8m-4f3c at a Glance
How to Fix GHSA-x9jp-4w8m-4f3c
To remediate this vulnerability, upgrade all affected Django jsonform 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 django-jsonform>=2.10.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show django-jsonform
How to Check if You Are Affected
To determine whether your Python environment is affected by GHSA-x9jp-4w8m-4f3c, inspect your installed packages using pip:
pip show django-jsonform
Analyze the terminal output to locate any version of Django jsonform in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.10.1), your application is affected.
Note: The pip show django-jsonform command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-80: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS), where the product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes special characters such as "<", ">", and "&" that could be interpreted as web-scripting elements when they are sent to a downstream component that processes web pages. In Django jsonform, 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
GHSA-x9jp-4w8m-4f3c Affected Django jsonform Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
django-jsonform
|
PyPI |
< 2.10.1
|
2.10.1
|
References
Frequently Asked Questions
What is GHSA-x9jp-4w8m-4f3c?
Which Django jsonform versions are affected?
What version fixes GHSA-x9jp-4w8m-4f3c?
Is django-jsonform affected?
What CWE is associated with GHSA-x9jp-4w8m-4f3c?
How can I check PyPI dependencies for GHSA-x9jp-4w8m-4f3c?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-x9jp-4w8m-4f3c",
"modified" : "2022-06-10T19:51:18Z",
"published" : "2022-06-10T19:51:18Z",
"aliases" : [ ],
"summary" : "Cross Site Scripting vulnerability in django-jsonform's admin form.",
"details" : "### Description\n\ndjango-jsonform stores the raw JSON data of the db field in a hidden textarea on the admin page. However, that data was kept in the textarea after unescaping it using the `safe` template filter. This opens up possibilities for XSS attacks.\n\nThis only affects the admin pages where the django-jsonform is rendered.\n\n### Mitigation\n\nUpgrade to django-jsonform version 2.10.1 or later.\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n\n* [Open an issue](https://github.com/bhch/django-jsonform/issues).\n* Email the maintainer at `Bharat Chauhan <tell.bhch@gmail.com>`.\n",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "django-jsonform"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.10.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/bhch/django-jsonform/security/advisories/GHSA-x9jp-4w8m-4f3c"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/bhch/django-jsonform"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79", "CWE-80" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2022-06-10T19:51:18Z",
"nvd_published_at" : null
}
}