<h2>XMLdoc2 entity validation with allowlistDisable entity expansion</h2><br/><div style="overflow-x:auto"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head><meta content="text/html; charset=UTF-8" /><meta name="copyright" content="(C) Copyright 2023" /><meta name="DC.rights.owner" content="(C) Copyright 2023" /><meta name="generator" content="DITA-OT" /><meta name="DC.type" content="reference" /><meta name="DC.title" content="XMLdoc2 entity validation with allowlistDisable entity expansion" /><meta name="abstract" content="If customizations do not require entity expansion, use the glide.xmlutil.max_entity_expansion property to completely disable external entity expansion. The XML completes parsing but doesn't include any internal or external entities." /><meta name="description" content="If customizations do not require entity expansion, use the glide.xmlutil.max_entity_expansion property to completely disable external entity expansion. The XML completes parsing but doesn't include any internal or external entities." /><meta name="DC.creator" content="Claire Rawlins" /><meta name="DC.creator" content="Phil Salzman" /><meta name="DC.creator" content="ServiceNow" /><meta name="DC.date.created" content="2022-12-22T22:56:17-08:00" /><meta name="DC.date.modified" content="2023-08-03" /><meta name="mini-toc" content="yes" /><meta name="DC.format" content="XHTML" /><meta name="DC.identifier" content="sc-xmldoc2-entity-validation-with-entity-expansion" /><link rel="stylesheet" type="text/css" href="../../../CSS/commonltr.css" /><title>XMLdoc2 entity validation with allowlistDisable entity expansion</title></head><body id="sc-xmldoc2-entity-validation-with-entity-expansion"> <h1 class="title topictitle1" id="ariaid-title1">XMLdoc2 entity validation with allowlistDisable entity expansion</h1> <div class="body refbody"><p class="shortdesc">If customizations do not require entity expansion, use the <span class="keyword parmname">glide.xmlutil.max_entity_expansion</span> property to completely disable external entity expansion. The XML completes parsing but doesn't include any internal or external entities.</p> <div class="section" id="sc-xmldoc2-entity-validation-with-entity-expansion__section_overview_other"> <ul class="ul" id="sc-xmldoc2-entity-validation-with-entity-expansion__ul_tsz_hhk_llb"><li class="li">If you set this property to <span class="ph uicontrol">true</span>, all external entities attempt to resolve or expand subject entities, subject to the setting of the <span class="keyword parmname">glide.stax.whitelist_enabled</span> property.</li><li class="li">If you set that property to <span class="ph uicontrol">false</span>, all entity resolution and expansion is blocked. To learn more, see <a class="xref" href="../../security/reference/allow-entity-validation-with-whitelisting-xmldoc2.html" title="Use a property to enable processing, using XMLDocument2, of external entities that are inclusion listed.">XMLdoc2 entity validation with allow list</a>.</li></ul> </div> <div class="section" id="sc-xmldoc2-entity-validation-with-entity-expansion__section_msm_4zy_jlb"><h2 class="title sectiontitle">Prerequisites</h2> <div class="p">Before setting this property:<ul class="ul" id="sc-xmldoc2-entity-validation-with-entity-expansion__ul_dfz_hgk_llb"><li class="li">Set the <span class="keyword parmname">glide.xml.entity.whitelist.enabled</span> and <span class="keyword parmname">glide.stax.whitelist_enabled</span> properties to true. To learn more, see <a class="xref" href="../../security/reference/allow-entity-validation-with-whitelisting.html" title="Use the glide.xml.entity.whitelist.enabled property to enable the validation of external entity, and only allows processing of inclusion listed ones.">XMLdoc/XMLUtil entity validation with allow list</a> and <a class="xref" href="../../security/reference/allow-entity-validation-with-whitelisting-xmldoc2.html" title="Use a property to enable processing, using XMLDocument2, of external entities that are inclusion listed.">XMLdoc2 entity validation with allow list</a>.</li><li class="li">Define a listing of comma-delimited FQDN in the <span class="keyword parmname">glide.xml.entity.whitelist</span> property, which is the only URLs that can be reached using XML Entity processing property. To learn more, see <a class="xref" href="../../security/reference/xml-external-entity-processing-whitelist.html" title="Use the glide.xml.entity.whitelist property to enable access to a listing of comma-delimited FQDN, if needed. These URLs are the only ones that can be reached using XML Entity processing.">XML external entity processing - allow list</a>.</li></ul> </div> </div> <div class="section" id="sc-xmldoc2-entity-validation-with-entity-expansion__section_more_information"><h2 class="title sectiontitle">More information</h2> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="sc-xmldoc2-entity-validation-with-entity-expansion__table_ajc_b43_3kb" class="table" frame="border" border="1" rules="all"><colgroup><col style="width:40%" /><col style="width:60%" /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d277144e145">Attribute</th><th class="entry cellrowborder" style="vertical-align:top;" id="d277144e148">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d277144e145 ">Property name</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d277144e148 "><span class="keyword parmname">glide.xmlutil.max_entity_expansion</span></td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d277144e145 ">Configuration type</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d277144e148 ">System Properties (/sys_properties_list.do)</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d277144e145 ">Category</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d277144e148 "><a class="xref" href="validation-sanitization-encoding.html" title="Validation, sanitization, and encoding addresses input validation to prevent against vulnerabilities like Cross-Site Scripting (XSS), SQL injection and other attacks.">Validation, sanitization, and encoding</a></td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d277144e145 ">Purpose</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d277144e148 ">This remediation control must be enabled to defend against an XML Entity Expansion/Billion Laugh attack.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d277144e145 ">Recommended value</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d277144e148 ">false</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d277144e145 ">Security risk rating</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d277144e148 ">9.8</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d277144e145 ">Functional impact</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d277144e148 ">(Low) If the customization is using entity expansion, then, the <span class="ph">Now Platform</span> might block further processing.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d277144e145 ">Security risk</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d277144e148 ">(Critical) An attacker can use this vulnerability to expand data exponentially, quickly consuming all system resources.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d277144e145 ">Workaround</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d277144e148 ">If the customization requires entity expansion, set this property to true and follow the steps documented in <a class="xref" href="../../security/reference/allow-entity-validation-with-whitelisting-xmldoc2.html" title="Use a property to enable processing, using XMLDocument2, of external entities that are inclusion listed.">XMLdoc2 entity validation with allow list</a>.</td></tr></tbody></table> </div> <p class="p">To learn more about adding or creating a system property, see <a class="xref" href="../administer/reference-pages/task/t_AddAPropertyUsingSysPropsList.dita/t_AddAPropertyUsingSysPropsList.html" target="_blank" rel="noopener noreferrer">Add a system property</a>.</p> <p class="p">For more information about OWASp resources, see <a class="xref" href="https://owasp.org/www-project-top-ten/2017/A4_2017-XML_External_Entities_%28XXE%29" target="_blank" rel="noopener noreferrer">OWASp</a>.</p> </div> </div> </body></html></div>