Sobelow.DOS.XML (Sobelow v0.19.0)
View SourcePotential resource exhaustion with explicit XML entity options
Entity expansion can amplify XML processing work and memory. External resource loading is a separate concern: it can consume resources and, depending on the resolver and context, may also expose files or enable unwanted requests. This check does not establish file disclosure, SSRF or exploitability.
This intentionally narrow check reports dynamic input to :xmerl_scan.string/2
and file/2 with explicit allow_entities: true, and to
:xmerl_sax_parser.stream/2 and file/2 with explicit
external_entities: :all or :file, or an entity_recurse_limit above 3.
:disallow_entities suppresses the recursion warning, but is not treated as
disabling external DTD loading. :skip_external_dtd alone does not disable
internal entities or all external entities. For supported, valid options, the
last duplicate value wins.
Controller inputs receive medium confidence; other dynamic inputs receive low confidence. Literal inputs, computed option lists and default-only calls are omitted, not certified safe. Options and defaults differ across OTP versions; this check does not validate runtime support. Default recursion limits are not cumulative byte budgets. Custom resolvers, input provenance and runtime versions are not inferred.
Disable unnecessary entities and external resolution using options supported
by the deployed runtime. Older xmerl versions may reject protective options
such as :disallow_entities; do not silently retry without protection.
Bound XML input, output/work, concurrency and permitted external resources
independently. Streaming alone is not a budget.
Review custom resolution callbacks rather than assuming they are safe.
Ignore this check with:
$ mix sobelow -i DOS.XML