Skip to content

Conversation

joekiller
Copy link

Problem:
The python http client uses xml.etree.ElementTree which can open the client up to XML external entity injection (XXE).

Issue:
#8083

Solution:
Explicitly use element tree parser with resolve_entities set to False.

References:

@joekiller
Copy link
Author

@microsoft-github-policy-service agree

@microsoft-github-policy-service microsoft-github-policy-service bot added the emitter:client:python Issue for the Python client emitter: @typespec/http-client-python label Sep 17, 2025
Copy link
Contributor

github-actions bot commented Sep 17, 2025

All changed packages have been documented.

  • @typespec/http-client-python
Show changes

@typespec/http-client-python - fix ✏️

Explicitly use element tree parser with resolve_entities set to False

@iscai-msft
Copy link
Member

@joekiller thank you for the pr! we don't want to add a third-party xml library that all generated libraries will have to depend on. I'm going to keep playing with your first attempt with the native xml library, and see if I can get things passing. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
emitter:client:python Issue for the Python client emitter: @typespec/http-client-python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants