Subresource Integrity (SRI) is not implemented, and external scripts are not loaded securely

OWASP 2013-A5 OWASP 2017-A6 OWASP 2021-A5 OWASP 2019-API7 PCI v3.2-11.5.1 OWASP PC-C1 CWE-1214 ISO27001-A.14.2.5 WASC-15

Subresource Integrity (SRI) provides a method to protect website delivery. It provides a mechanism to check the integrity of the resource hosted by third parties interface plug-ins. The plug-ins might include Content Delivery Networks (CDNs). This method verifies if the fetched resource has been delivered to the user without unexpected manipulation. This method ensures these assets have not been compromised for hostile purposes. SubResource Integrity cannot mitigate all risks in the application. A 3rd party javascript could access information from the end-users. Subresource integrity was introduced by scan and verify fetched files. An integrity value starts with at least one string. Each string contains a prefix that indicates hash algorithm. An integrity value may have multiple hashes, separated by whitespaces.


The below code is an example of integrity string with base64-encoded sha384 hash.




An attacker can gain access to Content Delivery Networks and cause huge damage to the application. If the attacker is one of the persons who had developed one of the CDN used by the application. He can gain access to your system by tweaking the content from CDN.

Mitigation / Precaution

Beagle recommends the following:-

  • Implement Sub resource integrity properly.
  • Load external URLs via HTTPS

Latest Articles