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

The functionality add attachment to parts allows access to local ports (SSRF). #1230

Open
alestorm980 opened this issue Jan 4, 2022 · 1 comment
Labels
Bug needs-triage incoming, please sort

Comments

@alestorm980
Copy link

Bug description

In PartKeepr before v1.4.0, the functionality to upload attachments using a URL when creating a part, does not validate that requests can be send to local ports, allowing SSRF attacks and port enumeration.

Steps to reproduce

  1. Go to 'Add Part'.
  2. Click on 'Attachments'.
  3. Click on 'Add'.
  4. Fill the 'URL' field with an url using a local port "http://127.0.0.1:3306".
  5. Click on the uploaded file in order to download the file and see the content.

Expected behavior

The application should not allow access to local ports.

Observed behavior

Local ports can be access inside the server.

Screenshots and files

ssrf

mysql_open_port

close_port

System Information

  • PartKeepr Version: v1.4.0 and v0.1.9
  • Operating System: Linux
  • Web Server: Apache
  • PHP Version: 7.4
  • Database and version: Mysql
  • Reproducible on the demo system: Yes.
@alestorm980 alestorm980 added Bug needs-triage incoming, please sort labels Jan 4, 2022
@alestorm980
Copy link
Author

I attach the link to the advisory https://fluidattacks.com/advisories/joplin/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug needs-triage incoming, please sort
Projects
None yet
Development

No branches or pull requests

1 participant