CVE-2024-31209: Oidcc OpenID Connect Client Atom Exhaustion Vulnerability

MODERATE
Advisory Identifier: GHSA-mj35-2rgf-cv8p
CVSS 5.3
CWE-400
Published
Advisory Summary

CVE-2024-31209 is a MODERATE (CVSS 5.3) openid connect client atom exhaustion vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Oidcc libraries in the Hex ecosystem. The issue involves openid connect client atom exhaustion in provider configuration worker ets table location. Remediation is available by upgrading affected packages to version 3.0.2, 3.1.2, 3.2.0-beta.3.

CVE-2024-31209 at a Glance

CVE Identifier CVE-2024-31209
GHSA Identifier GHSA-mj35-2rgf-cv8p
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product Oidcc
Package Ecosystem Hex
Published Date
Last Updated

Security Impact

CVSS: 5.3

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

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

How to Fix CVE-2024-31209

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

oidcc fixed: 3.0.2
Upgrade oidcc to 3.0.2
oidcc fixed: 3.1.2
Upgrade oidcc to 3.1.2
oidcc fixed: 3.2.0-beta.3
Upgrade oidcc to 3.2.0-beta.3
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 oidcc

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-31209, inspect your project dependencies for Oidcc:

inspect dependencies for oidcc

Analyze the terminal output to locate any version of Oidcc in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.0.2), 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-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Oidcc, 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 DOS by Atom exhaustion is possible by calling `oidcc_provider_configuration_worker:get_provider_configuration/1` or `oidcc_provider_configuration_worker:get_jwks/1`. Since the name is usually provided as a static value in the application using `oidcc`, this is unlikely to be exploited. ### Details Example to illustrate the vulnerability. ```erlang {ok, Claims} = oidcc:retrieve_userinfo( Token, myapp_oidcc_config_provider, <<"client_id">>, <<"client_secret">>, #{} ) ``` The vulnerability is present in `oidcc_provider_configuration_worker:get_ets_table_name/1`. The function `get_ets_table_name` is calling `erlang:list_to_atom/1`. https://github.com/erlef/oidcc/blob/018dbb53dd752cb1e331637d8e0e6a489ba1fae9/src/oidcc_provider_configuration_worker.erl#L385-L388 There might be a case (Very highly improbable) where the 2nd argument of `oidcc_provider_configuration_worker:get_*/1` is called with a different atom each time which eventually leads to the atom table filling up and the node crashing. ### Patches Patched in `3.0.2`, `3.1.2` & `3.2.0-beta.3` ### Workarounds Make sure only valid provider configuration worker names are passed to the functions. ### References * https://erlef.github.io/security-wg/secure_coding_and_deployment_hardening/atom_exhaustion.html * https://www.cve.org/CVERecord?id=CVE-2024-31209 * https://euvd.enisa.europa.eu/enisa/EUVD-2024-1249 * https://github.com/advisories/GHSA-mj35-2rgf-cv8p

CVE-2024-31209 Affected Oidcc Versions

3 component(s)
Fixed Versions:
3.0.23.1.23.2.0-beta.3
Product / Package Ecosystem Affected Versions Fixed Version
oidcc
Hex
≥ 3.0.0
< 3.0.2
3.0.2
oidcc
Hex
≥ 3.1.0
< 3.1.2
3.1.2
oidcc
Hex
≥ 3.2.0-beta.1
< 3.2.0-beta.3
3.2.0-beta.3

References

Frequently Asked Questions

What is CVE-2024-31209?
CVE-2024-31209 is a security vulnerability in Oidcc involving OpenID Connect client Atom Exhaustion in provider configuration worker ets table location under CWE-400: Uncontrolled Resource Consumption.
Which Oidcc versions are affected?
Affected versions include releases prior to 3.0.2, 3.1.2, 3.2.0-beta.3 across affected packages: oidcc.
What version fixes CVE-2024-31209?
Upgrading to 3.0.2, 3.1.2, 3.2.0-beta.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is oidcc affected?
Yes, oidcc is affected in releases prior to 3.0.2, 3.1.2, 3.2.0-beta.3. Upgrade your dependency to 3.0.2, 3.1.2, 3.2.0-beta.3 or later.
What is the CVSS score of CVE-2024-31209?
CVE-2024-31209 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:C/C:N/I:N/A:H.
What CWE is associated with CVE-2024-31209?
CVE-2024-31209 is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check Hex dependencies for CVE-2024-31209?
Run the dependency tree command: 'inspect dependencies for oidcc'. 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-mj35-2rgf-cv8p",
  "modified" : "2025-04-04T01:10:32Z",
  "published" : "2024-04-03T16:46:30Z",
  "aliases" : [ "CVE-2024-31209" ],
  "summary" : "OpenID Connect client Atom Exhaustion in provider configuration worker ets table location",
  "details" : "### Impact\n\nDOS by Atom exhaustion is possible by calling `oidcc_provider_configuration_worker:get_provider_configuration/1` or `oidcc_provider_configuration_worker:get_jwks/1`.\n\nSince the name is usually provided as a static value in the application using `oidcc`, this is unlikely to be exploited.\n\n### Details\n\nExample to illustrate the vulnerability.\n\n```erlang\n{ok, Claims} =\n  oidcc:retrieve_userinfo(\n    Token,\n    myapp_oidcc_config_provider,\n    <<\"client_id\">>,\n    <<\"client_secret\">>,\n    #{}\n  )\n```\n\nThe vulnerability is present in `oidcc_provider_configuration_worker:get_ets_table_name/1`.\nThe function `get_ets_table_name` is calling `erlang:list_to_atom/1`.\n\nhttps://github.com/erlef/oidcc/blob/018dbb53dd752cb1e331637d8e0e6a489ba1fae9/src/oidcc_provider_configuration_worker.erl#L385-L388\n\nThere might be a case (Very highly improbable) where the 2nd argument of\n`oidcc_provider_configuration_worker:get_*/1` is called with a different atom each time which eventually leads to\nthe atom table filling up and the node crashing.\n\n### Patches\n\nPatched in `3.0.2`, `3.1.2` & `3.2.0-beta.3`\n\n### Workarounds\n\nMake sure only valid provider configuration worker names are passed to the functions.\n\n### References\n\n* https://erlef.github.io/security-wg/secure_coding_and_deployment_hardening/atom_exhaustion.html\n* https://www.cve.org/CVERecord?id=CVE-2024-31209\n* https://euvd.enisa.europa.eu/enisa/EUVD-2024-1249\n* https://github.com/advisories/GHSA-mj35-2rgf-cv8p",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:C/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Hex",
      "name" : "oidcc"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0.0"
      }, {
        "fixed" : "3.0.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Hex",
      "name" : "oidcc"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.1.0"
      }, {
        "fixed" : "3.1.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Hex",
      "name" : "oidcc"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.2.0-beta.1"
      }, {
        "fixed" : "3.2.0-beta.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/erlef/oidcc/security/advisories/GHSA-mj35-2rgf-cv8p"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-31209"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/erlef/oidcc/commit/2f304d877c7e0613d6fd952d7feacbf40dbc355c"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/erlef/oidcc/commit/48171fb62688fb4eec1ead0884aa501e0aa68649"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/erlef/oidcc/commit/ac458ed88dc292aad6fa7343f6a53e73c560fb1a"
  }, {
    "type" : "WEB",
    "url" : "https://erlef.github.io/security-wg/secure_coding_and_deployment_hardening/atom_exhaustion.html"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/erlef/oidcc"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/erlef/oidcc/blob/018dbb53dd752cb1e331637d8e0e6a489ba1fae9/src/oidcc_provider_configuration_worker.erl#L385-L388"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-04-03T16:46:30Z",
    "nvd_published_at" : "2024-04-04T16:15:09Z"
  }
}