Skip to main content
LowSupply chainOWASP A05:2021CWE-540

How to fix: CocoaPods Podfile.lock exposed

The response is a CocoaPods lockfile, identified by its PODS and SPEC CHECKSUMS sections.

Why it matters

The lockfile lists every pod and its resolved version, including analytics, crash-reporting and payment SDKs, and the checksum of each spec. That is a full inventory of the third-party code inside the mobile app, which is what an attacker needs to find a known issue in a bundled SDK.

Like Package.resolved, this reaching a web server means an app repository was published rather than a build artifact. The EXTERNAL SOURCES section, when present, names private podspec repositories, which discloses internal hostnames along with the dependency list.

How to fix it

  1. 1Remove the iOS project directory from the web-served path.
  2. 2Confirm any private podspec repository the file named is not reachable without authentication.
  3. 3Review the listed pod versions against known advisories for those SDKs.

Code examples

Find app project files under the document root

bash
find /var/www -name 'Podfile*' -o -name '*.xcworkspace'

References

Detected automatically by VulnRadar. The check id is supply-chain-podfile-lock-exposed, stable across every scan so you can filter or diff on it.

See every supply chain check

Questions

How severe is CocoaPods Podfile.lock exposed?
VulnRadar rates this low severity in the supply chain category. The severity is fixed per check, not scored per site, so the same finding is the same severity on every scan.
Does VulnRadar check for this automatically?
Yes. It runs as part of every scan under the check id supply-chain-podfile-lock-exposed, which stays the same between runs so you can filter, diff, or gate CI on it.
Which standards does CocoaPods Podfile.lock exposed map to?
It maps to CWE-540. In the OWASP Top 10 it falls under A05:2021.

Missing a check?

The detection set is open. If you know a misconfiguration this does not catch, propose it: the issue template asks for the threat model, how to detect it, the false-positive risk, and a test fixture, which is the same thing a maintainer would have to work out anyway.

Propose a checkHow a check is built

Scan your own site for cocoapods podfile.lock exposed

VulnRadar runs this check and hundreds more against a URL in seconds. No agent to install, just paste a URL.

Or scan this site as a demoRead the docs

How to fix: CocoaPods Podfile.lock exposed | VulnRadar