Bitzu

CPSA ยท Web servers, architecture and protocols

HTML and XML

Structure, forms, entities and security-relevant features such as external entities.

Key points

  • HTML forms (<form>, <input>): send data via GET or POST; hidden fields, comments, inline scripts show in the source.
  • XML: strict, extensible data format (SOAP, config files, feeds).
  • Entities (&amp; or user-defined): replaced by values when parsed.
  • XML External Entity (XXE): a weak parser resolves entities to local files or internal URLs from untrusted input: file disclosure, SSRF, DoS.
  • Fix: disable DTDs and external entities.

Source: https://community.owasp.org/vulnerabilities/XML_External_Entity_(XXE)_Processing

Practice questions

Single choice

What does XXE stand for?

  1. XML External Entity
  2. Extended XSS Exploit
  3. XML Extension Encoding
  4. Cross-Execution eXploit
Show answer

Answer: A. XML External Entity

XXE is XML External Entity processing: the parser resolves entities defined outside the document. The other expansions are not standard terms.

Select all that apply

Which measures reduce XXE risk in an XML-processing application?

  1. Disable DTD processing in the parser
  2. Disable resolution of external entities
  3. HTML-encode the page title
  4. Use a longer session timeout
  5. Hide the Server header
Show answer

Answer: A. Disable DTD processing in the parser, B. Disable resolution of external entities

Disabling DTDs and external entities removes the mechanism. Blocking nothing and escaping output for HTML do not stop a parser from resolving entities.

True or false

True or false: an <input type="hidden"> field cannot be changed by the user, because it is not shown on the page.

Show answer

Answer: False

False. Hidden only affects display; the value is in the source and can be edited with developer tools or an intercepting proxy, so the server must not trust it.

Practice 8 questions on this topic in Bitzu

Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.

Download on the App StoreGet it on Google Play

More CPSA topics in this module