We have proposed for a while to enable this protection by default for 6.0, which was widely agreed to.
After some internal discussions, we decided to also make this the default for 5.4, as security shouldn’t be opt in, Lucee should be secure by default.
These changes have been implemented in
- 5.4.2.10-SNAPSHOT
- 6.0.0.514-SNAPSHOT
There will be a 5.4.2 RC and Stable release in the coming weeks
What’s a XXE you ask?
https://foundeo.com/security/guide/xml-external-entities/
A little example for our test cases, see that url? It will be called and bad actors can abuse it to compromise your server, just by parsing some xml
Tickets
- LDEV-3451 Disable XML entities by default against XXE in Lucee 6.0 & 5.4
- LDEV-4348 add xmlFeatures to getApplicationSettings
You can always change this default per application via the Application.cfc
settings
this.xmlFeatures = {
"externalGeneralEntities": false,
"secure": true,
"disallowDoctypeDecl": false
};
To override for a specific use case with trusted xml, you can do the following
application action="update" xmlFeatures={
"externalGeneralEntities": true,
"secure": false,
"disallowDoctypeDecl": false
};
xml = xmlParse( trustedXml );
application action="update" xmlFeatures={
"externalGeneralEntities": false,
"secure": true,
"disallowDoctypeDecl": true
};
Important upgrade advice
Support for this.xmlFeatures was introduced in 5.3.4.51
LDEV-1676 Expose XML Parser Configuration to prevent XXE
All applications should have this enabled via the Application.cfc
if you’re running an older version of Lucee than 5.3.4, consider yourself potentially vulnerable and plan to upgrade immediately
The Lucee team recommends everyone upgrading to 5.4.1.80, as we have being doing a lot of work to update all the underlying java libraries to make Lucee as secure as possible.
Supporting Lucee
Do you find these updates and advice useful? Please support our on going work