5.3
MEDIUM
CVE-2023-40021
Oppia CSRF Token Timing Attack Vulnerability
Description

Oppia is an online learning platform. When comparing a received CSRF token against the expected token, Oppia uses the string equality operator (`==`), which is not safe against timing attacks. By repeatedly submitting invalid tokens, an attacker can brute-force the expected CSRF token character by character. Once they have recovered the token, they can then submit a forged request on behalf of a logged-in user and execute privileged actions on that user's behalf. In particular the function to validate received CSRF tokens is at `oppia.core.controllers.base.CsrfTokenManager.is_csrf_token_valid`. An attacker who can lure a logged-in Oppia user to a malicious website can perform any change on Oppia that the user is authorized to do, including changing profile information; creating, deleting, and changing explorations; etc. Note that the attacker cannot change a user's login credentials. An attack would need to complete within 1 second because every second, the time used in computing the token changes. This issue has been addressed in commit `b89bf80837` which has been included in release `3.3.2-hotfix-2`. Users are advised to upgrade. There are no known workarounds for this vulnerability.

INFO

Published Date :

Aug. 16, 2023, 9:15 p.m.

Last Modified :

Nov. 21, 2024, 8:18 a.m.

Remotely Exploitable :

Yes !

Impact Score :

3.6

Exploitability Score :

1.6
Affected Products

The following products are affected by CVE-2023-40021 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Oppia oppia

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2023-40021 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2023-40021 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • CVE Modified by af854a3a-2127-422b-91ae-364da2661108

    Nov. 21, 2024

    Action Type Old Value New Value
    Added Reference https://github.com/oppia/oppia/blob/3a05c3558a292f3db9e658e60e708c266c003fd0/core/controllers/base.py#L964-L990
    Added Reference https://github.com/oppia/oppia/commit/b89bf808378c1236874b5797a7bda32c77b4af23
    Added Reference https://github.com/oppia/oppia/pull/18769
    Added Reference https://github.com/oppia/oppia/security/advisories/GHSA-49jp-pjc3-2532
  • CVE Modified by [email protected]

    May. 14, 2024

    Action Type Old Value New Value
  • Initial Analysis by [email protected]

    Aug. 25, 2023

    Action Type Old Value New Value
    Added CVSS V3.1 NIST AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N
    Changed Reference Type https://github.com/oppia/oppia/blob/3a05c3558a292f3db9e658e60e708c266c003fd0/core/controllers/base.py#L964-L990 No Types Assigned https://github.com/oppia/oppia/blob/3a05c3558a292f3db9e658e60e708c266c003fd0/core/controllers/base.py#L964-L990 Product
    Changed Reference Type https://github.com/oppia/oppia/commit/b89bf808378c1236874b5797a7bda32c77b4af23 No Types Assigned https://github.com/oppia/oppia/commit/b89bf808378c1236874b5797a7bda32c77b4af23 Patch
    Changed Reference Type https://github.com/oppia/oppia/pull/18769 No Types Assigned https://github.com/oppia/oppia/pull/18769 Patch
    Changed Reference Type https://github.com/oppia/oppia/security/advisories/GHSA-49jp-pjc3-2532 No Types Assigned https://github.com/oppia/oppia/security/advisories/GHSA-49jp-pjc3-2532 Exploit, Vendor Advisory
    Added CWE NIST CWE-203
    Added CPE Configuration OR *cpe:2.3:a:oppia:oppia:*:*:*:*:*:*:*:* versions from (including) 1.1.0 up to (excluding) 3.3.2 *cpe:2.3:a:oppia:oppia:3.3.2:-:*:*:*:*:*:*
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2023-40021 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Common Attack Pattern Enumeration and Classification (CAPEC) stores attack patterns, which are descriptions of the common attributes and approaches employed by adversaries to exploit the CVE-2023-40021 weaknesses.

Exploit Prediction

EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days.

0.17 }} -0.11%

score

0.39449

percentile

CVSS31 - Vulnerability Scoring System
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality
Integrity
Availability
© cvefeed.io
Latest DB Update: May. 05, 2025 10:42