Coursera API Vulnerability Could Affect Learners’ Experience

Popular online learning platform Coursera addressed a serious API vulnerability affecting potential students. Exploiting this bug could allow an attacker to manipulate how users view and access the content by abusing users’ preferences.

Coursera API Vulnerability Discovered

Researchers from Checkmarx Security Research Team discovered a serious vulnerability affecting Coursera API. The vulnerability precisely existed in the feature revolving around the users’ preferences.

As elaborated in their report, the researchers observed that Coursera’s web app displayed recently viewed courses in the user interface.

To render this information, we spotted several GET API requests to the same endpoint: /api/userPreferences.v1/{USER_ID}~{PREFERENCE_TYPE}.

Noticing the obvious user ID, the researchers tested it for Broken Object Level Authorization (BOLA) vulnerability. In simple words, they could fetch users’ preferences via these requests by modifying user IDs. This authorization problem could let them access other users’ preferences.

After several successful requests to retrieve preferences of several user accounts controlled by us, we were able to enumerate ten different preference types ({PREFERENCE_TYPE}): ONBOARDING, INVITATION, PAYMENT, saveCreditCard, HONORS, S12N_UPGRADE, ADMIN_SELECTED_PARTNER, PROMOTION_LANDING_PAGE, GENERIC, RECENTLY_VIEWED_XDP.

Further, they stripped the original request of cookies and headers to discovered that even anonymous users could exploit this bug. Plus, changing the requests from GET to PUT could also let them modify preferences.

In the case of an adversary, this would allow accessing regular users’ preferences and modifying them maliciously, thus affecting the content appearing in the user interface.

The following video demonstrates PoC exploit.

Bug Fixed

Following this discovery, the researchers reported the bug to Coursera officials via their vulnerability disclosure program on HackerOne.

In fact, the researchers found some more API issues besides BOLA.

Through our research, we discovered multiple API issues, such as user/account enumeration via the reset password feature, lack of resources limiting on both a GraphQL and REST API, and a GraphQL misconfiguration. But specifically, the Broken Object Level Authorization (BOLA) issue we found perfectly fits Coursera’s access control concerns.

Eventually, the service confirmed patching the flaws in May 2021.

Let us know your thoughts in the comments.

Related posts

Water Facilities Must Secure Exposed HMIs – Warns CISA

Microsoft December Patch Tuesday Arrived With 70+ Bug Fixes

NachoVPN Attack Risks Corporate VPN Clients