I am trying to determine if a .NET Core application is vulnerable to XML External Entity (XXE) injection attacks. I read this OWASP XXE Prevention Cheat Sheet which tells me, for example, that XmlDocument is unsafe by default in .NET Framework versions prior to 4.5.2. I cannot find any similar documentation for .NET Core versions. I see that .NET Core was released within a few months of .NET Framework 4.6.2. Can I therefore assume that these XML parsers are safe by default in .NET Core?
Are XML parsers safe from XML External Entity (XML) injection in .NET Core?
1k Views Asked by srk At
1
There are 1 best solutions below
Related Questions in .NET
- Does compiler optimize operation on const variable and literal const number?
- What is the point of definnig Asp.net Intrinsic Objects In different places and what is the different betwen them?
- Deleting Orphans with Fluent NHibernate
- IOrderedEnumerable to vb.net IOrderedEnumerable Conversion
- What is this namespace ITypeOfObjectsBoundToListBox ? Couldn't find it
- .net rest service with JSON string and consumed with java client
- What is best way to check if any of the property of object is null or empty?
- Telerik's WPF RadColorPicker NoColorText property not working
- Possible consequences of duplicate ProgId for different classes
- How are multiple requests to Task.Run handled from a resource management standpoint?
- Optimizing C++ call from C#
- Make a per-web-application object available to Web API and SignalR controllers
- System.ComponentModel.DataAnnotations.Schema namespace conflict
- LINQ Except/Distinct based on few columns only, to not add duplicates
- Not displaying content by its URL string - absolute urls
Related Questions in SECURITY
- Can MVC.NET prevent SQL-injection at razor or controller level?
- Forgotten password reset page: should the user need to enter a username/email as well?
- Dynamic roles list in CustomAuthorize ASP MVC
- Access roles from multiple applications
- How to Fix TLS CBC Incorrect Padding Abuse Vulnerability on Windows 2003 Server
- Evernote Web Clipper and Content Security Policy
- Invalidate user credentials when password changes
- Spring Boot MVC non-role based security
- Correct Captcha behaviour on error
- Is macro more secure than static const if I don't want someone to know or change the hardcode value?
- In Android, ensuring only pre-decided users can only use the app
- Authenticating plain text passwords against md5 hash in DB using Apache Shiro
- Symfony2 - handle HTTP/Entity user access restrictions
- Client side computation without exposing code?
- searchable row level encryption using java?
Related Questions in .NET-CORE
- NLog with DNX Core 5.0
- How should I reference HttpClient for dnx451 and dnxcore50?
- DNX Core 5.0 library to target any platform. No System.Random class. Workarounds or options?
- Kestrel Running which framework?
- Directory.CreateDirectory not exists in .NET Core
- asp.net dnxcore50 load assembly by file path
- .NET Core doesn't depend on any installation?
- Why is linq to object implementing iterators manually?
- Microsoft Band and WPF
- Determine port in asp.net core
- ASP.NET Core IISIntegration.Tools and .NET Framework
- ANTLR 4.5.3 C# lexer fails to initialize (ATN UUID error)
- Opening Visual Studio 2017 projects in Visual Studio 2015
- dotnetCore (1.0.0-preview2-1-003177) - build warnings as errors - how?
- How to implement interface of C# use COM of native C++?
Related Questions in XXE
- Veracode XML External Entity Reference (XXE)
- How to disable External Entity Resolution in xerces C++ DOMLSParser
- XXE prevention via WSDLReader
- XML External Entity Vulnerability DoS case: when the expansion happens?
- How to disable XInclude when parsing XML?
- how to prevent XXE attack using java 1.6
- Prevent XXE Attack with JAXB
- XXE billion laughs attack seems not to be mitigated as expected by the Sonar recommended solution to prevent XXE attacks
- XML External Entity Injection: Hp Fortify issue in java 1.6
- How do I know whether my application is vulnerable to CVE-2020-13692?
- Clarifications on XXE vulnerabilities throughout PHP versions
- IllegalArgumentException: Not supported when implement sonarqube solution for "XML parsers should not be vulnerable to XXE attacks"
- How to Prevent XML External Entity Injection on TransformerFactory
- Resolving XXE for Oracle DomParser
- Validate DTD and XXE in XML using libxml2 objective c
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
The XML parsers I tested have the same characteristics in .NET Core 2.1 as they do in .NET Framework 4.5.2 (at least with respect to XXE injection). To respond to the specific example I gave in the question,
XmlDocumentis unsafe by default in .NET Framework 4.5.1, but safe by default in both .NET Framework 4.5.2 and .NET Core 2.1.In order to convince myself of this fact, I performed testing for .NET Framework 4.5.1 and 4.5.2, and .NET Core 2.1. My code and results are available on GitHub.