CVE-2021-3311: October/rain October CMS Session ID Not Vulnerability

CRITICAL
Advisory Identifier: GHSA-7ggw-h8pp-r95r
CVSS 9.8
CWE-613
Published
Advisory Summary

CVE-2021-3311 is a CRITICAL (CVSS 9.8) october cms session id not vulnerability (CWE-613: Insufficient Session Expiration) affecting October/rain libraries in the Packagist ecosystem. The issue involves october cms session id not invalidated after logout. Remediation is available by upgrading affected packages to version 1.0.472, 1.1.2.

CVE-2021-3311 at a Glance

CVE Identifier CVE-2021-3311
GHSA Identifier GHSA-7ggw-h8pp-r95r
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-613: Insufficient Session Expiration
Affected Product October/rain
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 9.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2021-3311

To remediate this vulnerability, upgrade all affected October/rain dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

october/rain fixed: 1.0.472
Upgrade october/rain to 1.0.472
october/rain fixed: 1.1.2
Upgrade october/rain to 1.1.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for october/rain

How to Check if You Are Affected

To determine whether your application is affected by CVE-2021-3311, inspect your project dependencies for October/rain:

inspect dependencies for october/rain

Analyze the terminal output to locate any version of October/rain in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.472), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-613: Insufficient Session Expiration, where according to wasc, "insufficient session expiration is when a web site permits an attacker to reuse old session credentials or session ids for authorization.". In October/rain, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact When logging out, the session ID was not invalidated. This is not a problem while the user is logged out, but as soon as the user logs back in the old session ID would be valid again; which means that anyone that gained access to the old session cookie would be able to act as the logged in user. This is not a major concern for the majority of cases, since it requires a malicious party gaining access to the session cookie in the first place, but nevertheless has been fixed. ### Patches Issue has been patched in Build 472 (v1.0.472) and v1.1.2. ### Workarounds Apply https://github.com/octobercms/library/commit/642f597489e6f644d4bd9a0c267e864cabead024 to your installation manually if unable to upgrade to Build 472 or v1.1.2. ### References - Reported by Anisio (Brazilian Information Security Analyst) - http://cve.circl.lu/cve/CVE-2021-3311 ### For more information If you have any questions or comments about this advisory: * Email us at [hello@octobercms.com](mailto:hello@octobercms.com) ### Threat assessment: <img width="699" alt="Screen Shot 2021-02-07 at 11 50 35 PM" src="https://user-images.githubusercontent.com/7253840/107180881-51eaf000-699f-11eb-8828-333128faf2a6.png">

CVE-2021-3311 Affected October/rain Versions

2 component(s)
Fixed Versions:
1.0.4721.1.2
Product / Package Ecosystem Affected Versions Fixed Version
october/rain
Packagist
< 1.0.472
1.0.472
october/rain
Packagist
≥ 1.1.0
< 1.1.2
1.1.2

References

Frequently Asked Questions

What is CVE-2021-3311?
CVE-2021-3311 is a security vulnerability in October/rain involving October CMS Session ID not invalidated after logout under CWE-613: Insufficient Session Expiration.
Which October/rain versions are affected?
Affected versions include releases prior to 1.0.472, 1.1.2 across affected packages: october/rain.
What version fixes CVE-2021-3311?
Upgrading to 1.0.472, 1.1.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is october/rain affected?
Yes, october/rain is affected in releases prior to 1.0.472, 1.1.2. Upgrade your dependency to 1.0.472, 1.1.2 or later.
What is the CVSS score of CVE-2021-3311?
CVE-2021-3311 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2021-3311?
CVE-2021-3311 is classified under CWE-613: Insufficient Session Expiration (According to WASC, "Insufficient Session Expiration is when a web site permits an attacker to reuse old session credentials or session IDs for authorization.").
How can I check Packagist dependencies for CVE-2021-3311?
Run the dependency tree command: 'inspect dependencies for october/rain'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-7ggw-h8pp-r95r",
  "modified" : "2023-09-07T17:47:26Z",
  "published" : "2021-02-10T02:32:35Z",
  "aliases" : [ "CVE-2021-3311" ],
  "summary" : "October CMS Session ID not invalidated after logout",
  "details" : "### Impact\nWhen logging out, the session ID was not invalidated. This is not a problem while the user is logged out, but as soon as the user logs back in the old session ID would be valid again; which means that anyone that gained access to the old session cookie would be able to act as the logged in user. This is not a major concern for the majority of cases, since it requires a malicious party gaining access to the session cookie in the first place, but nevertheless has been fixed.\n\n### Patches\nIssue has been patched in Build 472 (v1.0.472) and v1.1.2.\n\n### Workarounds\nApply https://github.com/octobercms/library/commit/642f597489e6f644d4bd9a0c267e864cabead024 to your installation manually if unable to upgrade to Build 472 or v1.1.2.\n\n### References\n- Reported by Anisio (Brazilian Information Security Analyst)\n- http://cve.circl.lu/cve/CVE-2021-3311\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Email us at [hello@octobercms.com](mailto:hello@octobercms.com)\n\n### Threat assessment:\n<img width=\"699\" alt=\"Screen Shot 2021-02-07 at 11 50 35 PM\" src=\"https://user-images.githubusercontent.com/7253840/107180881-51eaf000-699f-11eb-8828-333128faf2a6.png\">",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "october/rain"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.0.472"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "october/rain"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.1.0"
      }, {
        "fixed" : "1.1.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/octobercms/october/security/advisories/GHSA-7ggw-h8pp-r95r"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-3311"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/octobercms/library/commit/642f597489e6f644d4bd9a0c267e864cabead024"
  }, {
    "type" : "WEB",
    "url" : "https://anisiosantos.me/october-cms-token-reactivation"
  }, {
    "type" : "WEB",
    "url" : "https://octobercms.com/forum/chan/announcements"
  }, {
    "type" : "WEB",
    "url" : "https://packagist.org/packages/october/rain"
  }, {
    "type" : "WEB",
    "url" : "http://cve.circl.lu/cve/CVE-2021-3311"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-613" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-02-10T02:30:45Z",
    "nvd_published_at" : "2021-02-05T14:15:00Z"
  }
}