Skip to content

harden: disable external XML entity processing in... - #1

Open
anupamme wants to merge 1 commit into
leelige:masterfrom
anupamme:fix-repo-article-xxe-yaml-urllib-vulnerabilities
Open

harden: disable external XML entity processing in...#1
anupamme wants to merge 1 commit into
leelige:masterfrom
anupamme:fix-repo-article-xxe-yaml-urllib-vulnerabilities

Conversation

@anupamme

Copy link
Copy Markdown

Summary

Harden input handling in daily_crawl_arxiv.py (flagged by semgrep).

Vulnerability

Field Value
ID gitlab.bandit.B313.B314.B315.B316.B318.B319.B320.B405.B406.B407.B408.B409.B410
Severity HIGH
Scanner semgrep
Rule gitlab.bandit.B313.B314.B315.B316.B318.B319.B320.B405.B406.B407.B408.B409.B410
File daily_crawl_arxiv.py:4
Assessment Defensive hardening

Description: Found use of the native Python XML libraries, which is vulnerable to XML external entity (XXE)
attacks. The Python documentation recommends the 'defusedxml' library instead. Use 'defusedxml'.
See https://github.com/tiran/defusedxml for more information.

Threat Model Context

This is a CLI tool - exploitation requires the attacker to control arguments or input files passed to the tool.

Changes

  • daily_crawl_arxiv.py
  • requirements.txt

Behavior Preservation

The change is scoped to 2 files on the vulnerable path; it only tightens handling of untrusted input and leaves valid inputs unaffected.


This patch removes an exploit primitive — a code pattern that, while not independently exploitable today, could be chained with other weaknesses by automated exploit-development tooling. Proactive removal of such primitives raises the bar against increasingly capable automated attack tools.


Automated security fix by OrbisAI Security

…B408.B409.B410 security vulnerability

Automated security fix generated by OrbisAI Security
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

Successfully merging this pull request may close these issues.

1 participant