Questions tagged [xml]

XML (Extensible Markup Language) is a set of rules for encoding documents in both human-readable and machine-readable form. Use this tag for security issues relating to the format itself, or where the fact that the data is xml-formatted is core to the question.

Filter by
Sorted by
Tagged with
0 votes
1 answer
43 views

Java XXE vulnerability

If I am already using xmlInputFactory.setProperty(XMLInputFactory.SUPPORT_DTD, false); then do I also need to use xmlInputFactory.setProperty("javax.xml.stream.isSupportingExternalEntities",...
user avatar
0 votes
0 answers
21 views

DNS spoofing an API? [duplicate]

Could someone DNS spoof REST API communication between a client device POST to a server URL running a XML-based API on HTTPS? If a man-in-the-middle for client device(s) POSTing to the server on a ...
user avatar
  • 101
0 votes
2 answers
88 views

How does my HTTPS POST get blocked based on XML content?

There's a web application on a server which I have full access to which accepts POST requests on a REST endpoint. The request payload is expected to be an XML document. For request routing and load ...
user avatar
  • 121
0 votes
0 answers
62 views

Authenticating Infrastructure SOAP-based API

I have been involved in a discussion the other day regarding the implementation of backend-to-backend authentication. The communications between each backend happen via SOAP (XML) message protocol. ...
user avatar
  • 1
1 vote
2 answers
258 views

What is an XML round trip vulnerability?

I keep hearing about the XML round trip vulnerability in version 3.2.4 of the Ruby package REXML. I looked into it myself, of course, and it seems to have something to do with parsing an XML document, ...
user avatar
  • 188
1 vote
1 answer
478 views

Blind XXE - Exfiltration Data via OOB

My lab Kali Linux:192.168.171.134 bWApp Server: http://192.168.171.131 I want to do an exfiltration data via HTTP on this Blind XXE. I'll use the Portswigger Payload. This is the External.DTD: &...
user avatar
0 votes
1 answer
745 views

XXE with OOB data exfiltration

SCENARIO: I successfully tried to send a request to the burp collaborator, then the application is vulnerable to SSRF through blind XXE. The payload I used is the following <?xml version="1.0&...
user avatar
  • 477
0 votes
2 answers
671 views

XXE Injection in docx: entity not defined

My goal is to create a docx file that, when uploaded to a server and parsed there, causes the parser to fetch my url so I know it worked. Unfortunately, I only have Libre Office and not MS Office at ...
user avatar
0 votes
1 answer
120 views

Bypassing Access-Control-Allow-Headers header [closed]

What i want to do is access the Content-type header which is placed under the Access-Control-Allow-Headers header as i want to attempt to change json to xml on a web application im working on to check ...
user avatar
2 votes
1 answer
280 views

XML External Entity injection within the body of a document

If you Google for an example of XXE injection you get something like this: <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE foo [ <!ELEMENT foo ANY > <!ENTITY xxe ...
user avatar
  • 244
2 votes
0 answers
186 views

What's the use of an "extra" dynamic declaration in an external DTD blind XXE attack?

I've been studying XXE attacks through portswigger blog. I don't understand the extra step of a dynamic declaration (i.e. <!ENTITY % eval...) in the below external DTD: <!ENTITY % file SYSTEM ...
user avatar
  • 1,097
1 vote
1 answer
999 views

Avoid cross site scripting in XML namespace

We have a legacy application on spring mvc and we have a web service exposed (SOAP protocol) for some reporting client app. This service was tested by a security team and the report indicates that the ...
user avatar
1 vote
0 answers
156 views

CWE-611: Improper Restriction of XML External Entity Reference with XSL include

Veracode reports that the below code is susceptible to CWE-611: Improper Restriction of XML External Entity Reference. XslCompiledTransform transform = new XslCompiledTransform(); transform.Load(...
user avatar
  • 143
0 votes
1 answer
316 views

Risks of allowing users to upload PDF and XML files to be stored/retrieved from a DB (ASPNET MVC 5)

I'm modifying an ASPNET MVC 5 web site and a requirement is to allow users to upload an XML and PDF file. The XML file will be used to layout text on the PDF based on variables coming from within the ...
user avatar
0 votes
1 answer
355 views

XXE - Encode file content

In my current assessment, I came across an XXE. Unfortunately, I cannot retrieve a bunch of files that would let me progress further (such as .bash_history and any other .xml/config files) because the ...
user avatar
  • 3
2 votes
1 answer
778 views

Blind XSS Payload for xml file?

I think i may have found a blind XSS. I can only upload xml files that are opened inside the backend. My questions is: How can i turn this payload into a blind xss payload to receive a ping to my ...
user avatar
5 votes
0 answers
993 views

Can XXE be exploited when disallow-doctype-decl is set to true (Apache)?

I found out that an endpoint of a website may be vulnerable to XXE. It is using Unmarshal as an XML parser. When I try to send a post request using common XXE payloads, I receive the following ...
user avatar
2 votes
1 answer
205 views

Does MathML pose a security risk?

MathML seems like a promising and attractive technology. But Google Chrome doesn't support it, allegedly because it has "architectural security issues" according this wikipedia page. But it also says "...
user avatar
1 vote
1 answer
917 views

SOAP Web Service: Basic Auth. vs Password in xml

I am testing a SOAP web service and the service sends username and password in every request as part of the XML body over SSL. I wanted to object to that and offer Basic Auth. but could not find any ...
user avatar
  • 670
0 votes
1 answer
361 views

Signature verification against custom CA [duplicate]

I need to (write a program to) verify signature in a (bunch of) signed XML files. NOTE: I am dealing with XML files signed according to 'http://www.w3.org/TR/2001/REC-xml-c14n-20010315', not just ...
user avatar
  • 217
0 votes
2 answers
251 views

Best way to encrypt user data stored in xml?

First of all I am not very familiar with the world of encryption so please be nice. I have got a data that should store in an xml using NetDataContractSerializer. This xml file gets the size of from ...
user avatar
  • 1
8 votes
1 answer
3k views

Is .NET XmlSerializer.Deserialize(TextReader) safe?

Is the .NET method XmlSerializer.Deserialize(TextReader) safe from XML vulnerabilities (XXE, XmlBomb etc..)? Will the DTD be processed during deserialization? I can understand why XmlSerializer....
user avatar
2 votes
1 answer
2k views

How to avoid XML vulnerabilities in Python?

I am writing a suite of Python 3 applications (including first a command line utility, second an HTTP(S) proxy) which deal with XML. Today I've discovered that there are several vulnerabilities ...
user avatar
  • 185
71 votes
5 answers
130k views

Why would I ever use AES-256-CBC if AES-256-GCM is more secure?

I guess the gist of my question is: Are there cases in which CBC is better than GCM? The reason I'm asking is that from reading this post by Matthew Green, and this question on cryptography stack ...
user avatar
3 votes
2 answers
4k views

What's the difference between an API gateway and XML gateway?

I'm studying for the CCSP exam and am confused on the difference between an "API gateway" and "XML gateway". The training material I have states: API gateways are also an important part of a ...
user avatar
  • 3,286
1 vote
0 answers
349 views

How can XML External Entity attacks be detected?

XML External Entity attacks have been identified as an OWASP top 10 web application vulnerability. Whilst there seems to be extensive information on what an XML external entity attack is and how it ...
user avatar
  • 479
-2 votes
1 answer
2k views

Can an XXE attack be carried out from within an docx file? [closed]

Is XXE possible in a file upload with .docx files?
user avatar
1 vote
0 answers
180 views

Example of Insecure DTD Processing in XmlSchema.Read

According to https://msdn.microsoft.com/en-us/library/mt661872.aspx and https://github.com/dotnet/roslyn-analyzers/issues/563 the code below is vulnerable to DTD expansion attack: var src = "?...
user avatar
1 vote
1 answer
1k views

Difference between XML external entities and Remote File Inclusion attacks

I was just studying about the XML external entities attack and Remote File Inclusion Attack. According to my understanding, the XML external entities attack is where the XML parser in the web ...
user avatar
  • 598
1 vote
0 answers
2k views

Private key to sign a XML file

I’ve never dealt with cryptography before so my question may be sound trivial. I need to create an app that sends messages as digitally signed XML files. The messages are sent to a CA entity. ...
user avatar
  • 11
12 votes
4 answers
6k views

Execute a PHP function that returns an array from an XSL file

There is a security challenge where you have to execute code on the server to retrieve a flag, and this code has to be executed using an XSL document. So I found a way to make the server interpret my ...
user avatar
  • 599
1 vote
0 answers
680 views

Mitigating - Microsoft XML Parser (MSXML) and XML Core Services Unsupported (62758)

We have a number of host that are running an outdated and now unsupported version of MS XML Parser\Core Services. I am trying to find a way to mitigate this issue silently on workstations, hopefully ...
user avatar
2 votes
3 answers
315 views

What is the purpose of encrypting a symetric key with a public key in XML EncryptedKey?

I was reading the XML Encryption standard and I have some trouble understanding the purpose of encrypting some plain text with a symmetric generated AES or 3DES key that in turn gets encrypted with ...
user avatar
  • 121
5 votes
1 answer
2k views

How does SAML signature exchange work between IDP and SP?

I'm trying to understand the SAML protocol 2.0 (signed) exchange. Here is what I understood so far: IDP has its own public (PB1) and private (PV1) pair SP has its own public (PB2) and private (PV2)...
user avatar
2 votes
1 answer
1k views

Any vulnerabilities from shorting browser's XML parser?

I have found a way of forcing a site to return content-type XML to the user's browser even though the content is HTML. The browser then interprets this site as XML and throws an error since the HTML ...
user avatar
  • 85
3 votes
1 answer
556 views

Why is this XPATH injection attack failing, and what is going on in the background of attack?

Hi I'm trying to understand XPATH injection, got a loacl ctf issue and cant seem to understand how it works. So this is the query: 555-555-555=true After fuzzing parameters I get: Description: ...
user avatar
  • 1,402
1 vote
0 answers
1k views

Java XXE Injection - Billion Laughs doesn't work

I'm trying to reproduce several xxe attacks against a java web service. When i try to reproduce "Billion Laughs" i always get this: Exception in thread "main" org.xml.sax.SAXParseException; ...
user avatar
12 votes
1 answer
3k views

Is PHP loadXML vulnerable to XXE attack (and to other attacks)? Is there a list of vulnerable functions?

I have PHP code that uses the loadXML function (as well as other XML functions). Is the loadXML function vulnerable to XXE attack? Namely, if the XML contains external entities, will they be ...
user avatar
  • 485
1 vote
0 answers
381 views

AES256 key exchange

I'm trying to get a secure way of exchanging keys between my client application and the server. The goal is to encrypt all XML messages with AES256. These XML's will be transferred to the server ...
user avatar
  • 11
2 votes
0 answers
465 views

cross-domain.xml file: Different policies in different directories

I came across cross-domain xml files on Vimeo and found that there are different policies on different directories. One on https://vimeo.com/settings/crossdomain.xml <?xml version="1.0" encoding="...
user avatar
  • 1,781
2 votes
1 answer
180 views

Are browsers fetching the XSLT namespace over HTTP when transforming XML?

According to the W3C recommendation (and according to W3C Schools), an XSL style sheet using XSLT should be declared as follows: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/...
user avatar
  • 23
1 vote
1 answer
717 views

Fuzzing C++ application that expects XML file

I'm trying to fuzz an application to make sure it is secure. The app does not have any UI and needs to be run via the cmdline: app.exe myfile.xml Also myfile.xml looks like this: <Sample> <...
user avatar
3 votes
1 answer
538 views

Single Page Application with REST API backend based on XML, queried by dynamic XPath

A web application I'm developing will be a Single Page Application (SPA) that will interact with a REST API backend, through jQuery.ajax() calls. The SPA and API will both be served over an https/TLS ...
user avatar
3 votes
1 answer
2k views

Can an XXE (XML External Entity) attack be carried out from within an SVG file?

Since SVG is built heavily if not entirely on XML, can one of the attacks that can be carried out through XML such as XXE injection be carried out from an SVG file?
user avatar
  • 33
4 votes
0 answers
848 views

Approach for testing XXE injection

I have been discussing xxe injection in my web application,My web application allows expansion of user-supplied XML entities What i did: Intercepted traffic using Burp. Changed the request with ...
user avatar
11 votes
4 answers
2k views

Is this a weakness of enveloped XML signature?

There might be a problem in many applications based on XML signature verification (provided I am not wrong, of course). Let's have a simple XML message with an enveloped XML signature: <?xml ...
user avatar
  • 356
38 votes
8 answers
7k views

How to know whether a textfile has been edited or tampered with?

Is it possible to know whether a textfile, e.g. in XML format, has been edited or tampered with over time? The context to my question follows: I am a scientist in industry using a technology called ...
user avatar
0 votes
1 answer
211 views

Collect XML files from web server with secure authentication

I need to collect XML files from a 3rd party's web server. These XML files are generated by said 3rd party on a daily basis (e.g. data_2015-11-26.xml) and should therefore be fetched at least daily ...
user avatar
65 votes
3 answers
19k views

Why do email programs block xml files?

A colleague sent a .xml file to me earlier today, which was blocked by Outlook. As we were discussing the workaround (put it in a .zip), we got to wondering why .xml files are blocked. My colleague ...
user avatar
-1 votes
1 answer
286 views

Oversized XML attack in axis 1.4

How can we prevent oversized XML attack in webservice implemented with Apache Axis 1.4?
user avatar
  • 107