# ExploitTitle:ERPNext12.29-Cross-SiteScripting(XSS)
# Date:7Feb2023
# ExploitAuthor:PatrickDeanRamos/NathuNandwani/JunnairManla
#Github- https://github.com/patrickdeanramos/CVE-2022-28598
# VendorHomepage: https://erpnext.com/
# Version:12.29
# CVE-2022-28598Summary:Stored cross-site scripting (XSS) vulnerability was found in ERPNext12.29 where the
"last_known_version" field found in the "My Setting" page in ERPNext12.29.0 allows remote attackers toinject arbitrary web script or HTML via
a crafted site name by doing an authenticated POSTHTTP request to
'/desk#Form/User/(AuthenticatedUser)' and inject the script in the
'last_known_version' field where we are able toview the script by
clicking the 'pdf' view form.
This vulnerability is specifically the "last_known_version" field found
under the 'MySettings' where we need tofirst save the my settings.1.Login as any user
2.Under the ‘last_known_version’ field we are going toinject our
malicious script.3.To view our injected script we need toclick the view pdf page, and as
seen below we have successfully injected our script.