HomeTopicsA08 Software & Data Integrity Failures
Lesson 8 / 10

A08: Software & Data Integrity Failures

Software and data integrity failures relate to code and infrastructure that does not protect against integrity violations. This includes insecure CI/CD pipelines, auto-updates without verification, and insecure deserialization.

Key Vulnerabilities

1

Using libraries from untrusted CDNs without integrity checks (SRI)

2

Insecure CI/CD pipelines allowing unauthorized code deployment

3

Auto-update mechanisms without signature verification

4

Insecure deserialization of objects from untrusted sources

5

Serialized data modified by attackers

6

Missing integrity checks on critical data

Prevention Strategies

Use digital signatures to verify software and data integrity

Use Subresource Integrity (SRI) for CDN-hosted libraries

Use tools like OWASP Dependency Check to verify components

Ensure CI/CD pipeline has proper segregation and access controls

Do not send serialized data to untrusted clients without integrity checks

Review code and configuration changes through proper approval process

Real-World Example

The 2020 SolarWinds attack is a prime example — attackers compromised the build system to inject malicious code into legitimate software updates, affecting 18,000+ organizations.

Code Comparison

Vulnerable Code
<!-- VULNERABLE: CDN script without integrity check -->
<script src="https://cdn.example.com/lib.js"></script>
<!-- If CDN is compromised, malicious code runs on your site -->

// VULNERABLE: Deserializing untrusted data
const userData = JSON.parse(
  Buffer.from(cookie, 'base64').toString()
);
Secure Code
<!-- SECURE: Subresource Integrity (SRI) -->
<script src="https://cdn.example.com/lib.js"
  integrity="sha384-abc123..."
  crossorigin="anonymous"></script>

// SECURE: Signed + verified data
const data = jwt.verify(token, publicKey, {
  algorithms: ['RS256']
});