Skip to content

Numerous security issues. #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
d1b opened this issue Apr 21, 2019 · 0 comments
Open

Numerous security issues. #4

d1b opened this issue Apr 21, 2019 · 0 comments

Comments

@d1b
Copy link

d1b commented Apr 21, 2019

Hi, there are several security issues in the code found in this repository.

The first is that

file = open(os.path.join(self.dir,name), 'wb')
is vulnerable to path traversal. It needs to filter out path traversal characters (e.g. take the basename of a given file) or generate its own filename(s) or consume the xml without writing it to the file system to fix this issue.

Another issue that seemingly exists is
XXE(https://en.wikipedia.org/wiki/XML_external_entity_attack) when
parsing dmarc xml reports. This appears to be in
https://github.com/thinkingserious/sendgrid-python-dmarc-parser/blob/master/dmarc_parser/parse_dmarc.py#L26
and can be fixed by making use of https://pypi.org/project/defusedxml/ .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant