Example
A HTML document was created with the content below, and saved as “test.html”.
<html>
<body>
<img src="http://our-server.com/image.jpg">
</body>
</html>
The HTML document includes a reference a image. Note that the source (src) attribute on the tag was pointing to a server for which access logs were available.
The file extension of the document was then was renamed to “test.odt”. Now, Aspose tools were used to convert the document to PDF. During this process, the tool would request the referenced image. This could also be confirmed by the logs from “our-server.com” that the file was accessed.
In our application, the Aspose components are running in a web application. A user may upload a file to the server, which is then converted to PDF before storage. This scenario opens up for server side request forgery.
Server side request forgery occurs when an attacker can coerce a web application to perform HTTP requests toward a attacker-controlled location. Because the security posture often differ between local networks to external networks, an attacker able to make requests on behalf of the server, bypasses external network trust borders like firewalls in order to communicate with any local service. Services local to the server might lack security measures often found in externally exposed services, under the belief that local network communication is trusted. An attacker can exploit these conditions to access sensitive information served by a local service.
How can this behavior be disabled in Aspose tools?