#SecurityExplained S-91: CWE Top 25:
CWE-611: Improper Restriction of XML External Entity Reference
1/n
2/n
When an application executes an XML document that contains entities pointing to external URIs, CWE-611 vulnerabilities can occur.
3/n
These URIs resolve to assets outside the application's control, resulting in potentially dangerous execution of activities prescribed by the external assets.
4/n
An issue in parsing an XML file containing XML entities with URIs that potentially refer to documents beyond the intended place is the source of the flaw.
5/n
If the program fails to check the path to documents before including them, the attacker can consist of any file from a local or remote system and have it displayed by the application.
6/n
XML uses a tree-like structure of tags and data to store and convey data. A document type definition (DTD) can be found in an XML document, and its declarations describe the document's structure, data values, rights, and so on.
7/n
The DTD might be embedded in the document or referenced from another location. You can specify "XML entities" in DTDs, which refer to values in the document in the same way that variables are used in programming languages.
8/n
The XXE attack is based on the ability of the XML language to declare arbitrary entities using an external Data Type Definition (DTD) and the ability to read and execute files.
9/n
# Potential Impact:
The impact can range from local / remote file inclusion to remote command execution and entire system compromise, depending on the application's implementation and architecture.
10/n
This vulnerability can also be exploited to execute internal network port scans on the affected machine or servers.
The attacker may be able to access arbitrary files on the system if a malicious DTD is included and a default entity resolver is enabled.
11/n
The DTD can include any HTTP request that the server can handle. Therefore, other attacks could be launched due to the server's trust connection with other entities.
12/n
# Mitigations:
This vulnerability is frequently introduced to the program during the architecture and design phase. Therefore, it is nearly impossible to mitigate this vulnerability without modifying the application source code in most circumstances.
13/n
External entity expansion can be disabled in many XML parsers and validators.
Allowing application functionality that parses XML documents should be avoided.
n/n
Implement server-side input validation, filtering, or sanitization that is positive allowlisting to prohibit malicious data from entering XML documents or headers.
Configure the XML parser so that no DTD declarations are validated or processed.
• • •
Missing some Tweet in this thread? You can try to
force a refresh
#SecurityExplained S-90: CWE Top 25: CWE-918: Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and obtains its contents, but it does not check that the request is routed to the correct destination.
1/n
2/n
Malicious parties can use CWE-918, also known as server-side request forgeries (SSRF), to trick a server into making requests to obtain access to internal infrastructure, sensitive data, and more.
3/n
The use of URLs helps identify the attack surface for SSRF. Although sanitization and allow lists are two more effective techniques available, they can be challenging to manage.
#SecurityExplained S-89: CWE Top 25: CWE-522: Insufficiently Protected Credentials
The product transfers or saves authentication credentials, but it does so improperly that it can be intercepted or retrieved by unauthorized individuals.
1/n
2/n
This flaw relates to an architectural security approach that has been misdesigned. Another form of credential attack uses flaws in how passwords are encoded, saved, and handled by a web application, network, or software system.
3/n
Risky development practices, such as storing passwords in insecure locations, storing credentials in plaintext, storing user passwords using poor or reproducible cryptographic techniques, or using hard-coded credentials, generate vulnerabilities....
#SecurityExplained S-88: CWE Top 25: CWE-732: Incorrect Permission Assignment for Critical Resource
The product defines permissions for a security-critical resource so that unwanted actors can read or modify it.
1/n
2/n When a resource's permissions are set to allow access to a broader range of actors than is required, sensitive information may be exposed, or undesired parties may modify the resource.
3/n
This is very risky when the resource is tied to program configuration, execution, or sensitive user data.