BUG:Unrestricted access from other web origins

Open
#1,677 4 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 3 days

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
28/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
api, backend, security

Research direction

The CORS setup the issue points to is at about line 185 of the API configuration, where Access-Control-Allow-Origin is set to a wildcard and preflight POST is approved. Start there, then find which routes (such as album listing) lack authentication. Done means untrusted origins no longer receive CORS approval and sensitive operations require auth, with tests covering a rejected origin. Authentication is a design decision, so confirm scope with maintainers first.

Written by the indexing model from the issue text.

Description

bug possible-duplicate
Is there an existing issue for this?
  • I have searched the existing issues
What happened?

Live API accepted https://attacker.example, returned wildcard CORS on album listing, and approved POST preflight. No API authentication protects these routes. Browser local-network restrictions may limit exploitation.

location: [API CORS configuration (line 185) restrict origins and authenticate sensitive operations.

PictoPy’s backend runs on your computer, but its [CORS settings (line 185)] tell browsers that any website may request data from it. The API also has no authentication on routes such as album listing.

For example, if you visit a malicious website while PictoPy is running, that site could try to request http://localhost:52123/albums/. In my test, the backend accepted a request claiming to come from an unrelated website and returned a CORS header allowing it to read the response.

The risk is that a website could read photo-library information or call sensitive API routes. I verified the server behavior, but I did not demonstrate a complete browser attack; browser protections for access to local services may affect whether a particular website can exploit it. Restricting allowed origins and adding authentication to sensitive routes would address the underlying problem.

Record
  • I agree to follow this project's Code of Conduct
Dominant language
Python
Stars
322
Forks
793
Avg merge
6d 10h
Merged PRs (30d)
20

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from AOSSIE-Org/PictoPy

All issues in AOSSIE-Org/PictoPy

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.