Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Security: xml.etree.ElementTree used across 10 core modules — no XXE protection

Aperta
#617 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

@DearMoon50 ci sta già lavorando.

Dal 22/9/2026.

  • #629 di @DearMoon50 — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
python
Ambito
security

Direzione di ricerca

Review the XML imports in base.py, firewall.py, network.py, panorama.py, policies.py, objects.py, ha.py, plugins.py, userid.py, and init.py, then inspect panos/base.py:3172 for the hashlib.sha1 use. Treat the two findings as separate work items and check the project’s existing tests after each change. Done means unsafe XML parsing is addressed across all listed modules and the SHA-1 finding has a documented resolution.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

During a security audit of pan-os-python, two findings were identified.


Finding 1: Unsafe XML parser (High)

xml.etree.ElementTree is used across 10 core modules with no defusedxml
replacement or defuse_stdlib() call anywhere in the codebase.

Affected modules:
base.py, firewall.py, network.py, panorama.py, policies.py,
objects.py, ha.py, plugins.py, userid.py, __init__.py

The library's purpose is parsing XML responses from live network devices.
Any attacker-influenced response (MitM, compromised appliance, rogue endpoint)
is processed without XXE or Billion Laughs protection.

Fix: replace import xml.etree.ElementTree as ET with
import defusedxml.ElementTree as ET in each affected module.
Drop-in compatible, no API changes required.


Finding 2: SHA-1 used for value hashing (Medium)

panos/base.py:3172 uses hashlib.sha1() with an inline comment
explicitly documenting the usage. SHA-1 has been cryptographically
broken since 2017.

Lingua principale
Python
Stelle
402
Fork
199
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di PaloAltoNetworks/pan-os-python

Tutte le issue di PaloAltoNetworks/pan-os-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.