CyberSecBulletin
CVE-2024-38367NVD status: Modified

CocoaPods: Exposure of Data Element to Wrong Session

CVE-2024-38367 is a critical-severity exposure of data element to wrong session vulnerability in CocoaPods, with a CVSS 3.1 base score of 9.6 out of 10. It can be exploited remotely over the network by an unauthenticated attacker, but only if a user takes part, for example by opening a link or file. The record lists version d4fa66f49cedab449af9a56a21ab40697b9f7b97 as the first without the flaw, so updating CocoaPods to that release or later removes the exposure. There is no confirmed exploitation so far. EPSS estimates a 11.1% chance of exploitation within 30 days, which is in the top 3.99% of all scored CVEs.

Patch this week

Critical severity: a successful attack would have severe impact.

What to do

  1. Update CocoaPods to d4fa66f49cedab449af9a56a21ab40697b9f7b97 or a later version.
  2. Update Trunk.cocoapods.org to 2023-10-27 or a later version.
  3. Read the advisory on blog.cocoapods.org for workarounds and exact fixed builds.
  4. Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.
  5. Because the attack needs a user to take part, warn users about unexpected links and files related to this product until it is patched.

Affected products and versions

VendorProductAffected versionsFixed in
CocoaPodsCocoaPods< d4fa66f49cedab449af9a56a21ab40697b9f7b97; before d4fa66f49cedab449af9a56a21ab40697b9f7b97d4fa66f49cedab449af9a56a21ab40697b9f7b97
CocoapodsTrunk.cocoapods.orgbefore 2023-10-272023-10-27

Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.

How the severity score breaks down

Attack vector
NetworkCan be exploited remotely over a network, including the internet.
Attack complexity
LowNo special conditions are needed; the attack works reliably.
Privileges required
NoneNo account or login is needed.
User interaction
RequiredA user must take an action such as opening a file or link.
Scope
ChangedThe attack can reach beyond the vulnerable component into other systems.
Confidentiality
HighAll data handled by the component can be read.
Integrity
HighData or code can be modified at will.
Availability
HighThe component can be taken down completely.

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H. Scored by NVD.

Scoring systemScoreSeverityScored by
CVSS 3.18.2HighCNA (github.com)
CVSS 3.19.6CriticalNVD

Official description

trunk.cocoapods.org is the authentication server for the CoacoaPods dependency manager. Prior to commit d4fa66f49cedab449af9a56a21ab40697b9f7b97, the trunk sessions verification step could be manipulated for owner session hijacking Compromising a victim’s session will result in a full takeover of the CocoaPods trunk account. The threat actor could manipulate their pod specifications, disrupt the distribution of legitimate libraries, or cause widespread disruption within the CocoaPods ecosystem. This was patched server-side with commit d4fa66f49cedab449af9a56a21ab40697b9f7b97 in October 2023.

Source: the CVE record as published by its numbering authority, via NVD and CVE.org.

The underlying weakness: Exposure of Data Element to Wrong Session

The product does not sufficiently enforce boundaries between the states of different sessions, causing data to be provided to, or used by, the wrong session.

How developers prevent this class of flaw

  • Protect the application's sessions from information leakage. Make sure that a session's data is not used or visible by other sessions.
  • Use a static analysis tool to scan the code for information leakage vulnerabilities (e.g. Singleton Member Field).
  • In a multithreading environment, storing user data in Servlet member fields introduces a data access race condition. Do not use member fields to store information in the Servlet.

More Exposure of Data Element to Wrong Session vulnerabilities (CWE-488)

Timeline

  1. CVE record published.
  2. CISA published its SSVC assessment (exploitation: poc, automatable: no, technical impact: partial).
  3. Record last changed materially (score, affected products, status or references).

References

Technical write-ups (may include proof of concept)

Other vulnerabilities in CocoaPods

All CocoaPods vulnerabilities

Recent Exposure of Data Element to Wrong Session vulnerabilities

Spotted an error? Tell us.