BUG:Unrestricted access from other web origins

Abierto
#1,677 4 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 3 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
28/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
python
Área
api, backend, security

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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
Lenguaje dominante
Python
Estrellas
322
Forks
793
Merge medio
6 d 10 h
PR fusionados (30 d)
20

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de AOSSIE-Org/PictoPy

Todos los issues de AOSSIE-Org/PictoPy

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.