Skip to content
This repository has been archived by the owner on Dec 19, 2023. It is now read-only.

Security fix for Cross-Site Scripting Vulnerability in frappe-charts #1

Merged
merged 1 commit into from
Nov 16, 2020

Conversation

arjunshibu
Copy link

@arjunshibu arjunshibu commented Nov 11, 2020

📊 Metadata *

frappe-charts is vulnerable to Cross-Site Scripting (XSS).

Bounty URL: https://www.huntr.dev/bounties/1-npm-frappe-charts

⚙️ Description *

Cross-Site Scripting (XSS) attacks are a type of injection, in which malicious scripts are injected into otherwise benign and trusted websites. XSS attacks occur when an attacker uses a web application to send malicious code, generally in the form of a browser side script, to a different end user.

💻 Technical Description *

While rendering charts, the package is validating all object fields except name in datasets array, this allows malicious code execution. The fix is implemented by properly validating name field to escape malicious characters.

🐛 Proof of Concept (PoC) *

Steps To Reproduce

References

Github Issue

🔥 Proof of Fix (PoF) *

  • Before fix
    poc
  • After fix, Cross-Site Scripting is prevented.
    pof

+1 User Acceptance Testing (UAT)

  • I've executed unit tests.
  • After fix the functionality is unaffected.

Copy link

@Mik317 Mik317 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 😄 🍰

Cheers,
Mik

@huntr-helper
Copy link
Member

Congratulations arjunshibu - your fix has been selected! 🎉

Thanks for being part of the community & helping secure the world's open source code.
If you have any questions, please respond in the comments section, or hit us up on Discord. Your bounty is on its way - keep hunting!

Come join us on Discord

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants