AOSSIE-Org / AOSSIE-Org/PictoPy

BUG: Unauthenticated shutdown endpoint allows local denial of service

Aberta
#1,241 7 comentários 0 reações 1 responsável Reivindicada por @Dotify71 Ver no GitHub
backend question
Linguagem predominante
Python
Estrelas
283
Forks
679
Merge médio
7d 2h
PRs com merge (30d)
3

Descrição

### Is there an existing issue for this?

- [x] I have searched the existing issues

### What happened?

Unauthenticated shutdown endpoints can be triggered locally and cause immediate denial of service.

Both backend and sync microservice expose POST /shutdown without authentication, token validation, or trusted-caller checks. Any local process that can send HTTP requests to localhost can terminate one or both services.

Reproduction:

- Start PictoPy normally.
- Send POST request to backend shutdown endpoint on port 52123.
- Send POST request to sync microservice shutdown endpoint on port 52124.
- Observe service process exit.
- Expected behavior:
- Only trusted internal app logic should be able to shut down services.

Actual behavior:

- Any unauthenticated local caller can invoke shutdown and terminate processes.

Impact:

- High local DoS risk. Active indexing/sync operations can be interrupted and app reliability is degraded.

Suggested fix:

- Require authenticated shutdown secret or signed IPC command.
- Restrict shutdown actions to trusted caller context.
- Disable or harden HTTP shutdown routes in production builds.

### Record

- [x] I agree to follow this project's Code of Conduct

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.