Skip to content

Numerous security issues. #4

@d1b

Description

@d1b

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/ .

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions