CVE-2024-34706: @valtimo/components @valtimo/components Exposes Access Token To Vulnerability

CRITICAL
Advisory Identifier: GHSA-xcp4-62vj-cq3r
CVSS 9.8
CWE-532
Published
Advisory Summary

CVE-2024-34706 is a CRITICAL (CVSS 9.8) @valtimo/components exposes access token to vulnerability (CWE-532: Insertion of Sensitive Information into Log File) affecting @valtimo/components libraries in the npm ecosystem. The issue involves @valtimo/components exposes access token to form.io. Remediation is available by upgrading affected packages to version 10.8.4, 11.1.6, 11.2.2.

CVE-2024-34706 at a Glance

CVE Identifier CVE-2024-34706
GHSA Identifier GHSA-xcp4-62vj-cq3r
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-532: Insertion of Sensitive Information into Log File
Affected Product @valtimo/components
Package Ecosystem npm
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-2024-34706

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

@valtimo/components fixed: 10.8.4
npm install @valtimo/components@10.8.4
@valtimo/components fixed: 11.1.6
npm install @valtimo/components@11.1.6
@valtimo/components fixed: 11.2.2
npm install @valtimo/components@11.2.2
Verify Direct and Transitive Dependencies

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

npm ls @valtimo/components

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2024-34706, inspect your project dependencies using npm:

npm ls @valtimo/components

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

Note: The npm ls @valtimo/components command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-532: Insertion of Sensitive Information into Log File, where the product writes sensitive information to a log file. In @valtimo/components, 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 opening a form in Valtimo, the access token (JWT) of the user is exposed to `api.form.io` via the the `x-jwt-token` header. An attacker can retrieve personal information from this token, or use it to execute requests to the Valtimo REST API on behalf of the logged-in user. This issue is caused by a misconfiguration of the Form.io component. ### Attack requirements ### The following conditions have to be met in order to perform this attack: - An attacker needs to have access to the network traffic on the `api.form.io` domain. - The content of the `x-jwt-token` header is logged or otherwise available to the attacker. - An attacker needs to have network access to the Valtimo API. - An attacker needs to act within the time-to-live of the access token. The default TTL in Keycloak is 5 minutes. ### Patches Versions 10.8.4, 11.1.6 and 11.2.2 have been patched

CVE-2024-34706 Affected @valtimo/components Versions

3 component(s)
Fixed Versions:
10.8.411.1.611.2.2
Product / Package Ecosystem Affected Versions Fixed Version
@valtimo/components
npm
< 10.8.4
10.8.4
@valtimo/components
npm
≥ 11.0.0
< 11.1.6
11.1.6
@valtimo/components
npm
≥ 11.2.0
< 11.2.2
11.2.2

References

Frequently Asked Questions

What is CVE-2024-34706?
CVE-2024-34706 is a security vulnerability in @valtimo/components involving @valtimo/components exposes access token to form.io under CWE-532: Insertion of Sensitive Information into Log File.
Which @valtimo/components versions are affected?
Affected versions include releases prior to 10.8.4, 11.1.6, 11.2.2 across affected packages: @valtimo/components.
What version fixes CVE-2024-34706?
Upgrading to 10.8.4, 11.1.6, 11.2.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @valtimo/components affected?
Yes, @valtimo/components is affected in releases prior to 10.8.4, 11.1.6, 11.2.2. Upgrade your dependency to 10.8.4, 11.1.6, 11.2.2 or later.
What is the CVSS score of CVE-2024-34706?
CVE-2024-34706 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-2024-34706?
CVE-2024-34706 is classified under CWE-532: Insertion of Sensitive Information into Log File (The product writes sensitive information to a log file.).
How can I check npm dependencies for CVE-2024-34706?
Run the dependency tree command: 'npm ls @valtimo/components'. 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-xcp4-62vj-cq3r",
  "modified" : "2024-05-14T20:04:06Z",
  "published" : "2024-05-13T16:04:55Z",
  "aliases" : [ "CVE-2024-34706" ],
  "summary" : "@valtimo/components exposes access token to form.io",
  "details" : "### Impact\nWhen opening a form in Valtimo, the access token (JWT) of the user is exposed to `api.form.io` via the the `x-jwt-token` header. An attacker can retrieve personal information from this token, or use it to execute requests to the Valtimo REST API on behalf of the logged-in user.\n\nThis issue is caused by a misconfiguration of the Form.io component.\n\n### Attack requirements ###\nThe following conditions have to be met in order to perform this attack:\n- An attacker needs to have access to the network traffic on the `api.form.io` domain.\n- The content of the `x-jwt-token` header is logged or otherwise available to the attacker.\n- An attacker needs to have network access to the Valtimo API.\n- An attacker needs to act within the time-to-live of the access token. The default TTL in Keycloak is 5 minutes.\n\n### Patches\nVersions 10.8.4, 11.1.6 and 11.2.2 have been patched",
  "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" : "npm",
      "name" : "@valtimo/components"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "10.8.4"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@valtimo/components"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "11.0.0"
      }, {
        "fixed" : "11.1.6"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@valtimo/components"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "11.2.0"
      }, {
        "fixed" : "11.2.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/valtimo-platform/valtimo-frontend-libraries/security/advisories/GHSA-xcp4-62vj-cq3r"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-34706"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/valtimo-platform/valtimo-frontend-libraries/commit/1aaba5ef5750dafebbc7476fb08bf2375a25f19e"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/valtimo-platform/valtimo-frontend-libraries/commit/8c2dbf2a41180d2b0358d878290e4d37168f0fb6"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/valtimo-platform/valtimo-frontend-libraries/commit/d65e05fd2784bd4a628778b34a5b79ce2f0cef8c"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/valtimo-platform/valtimo-frontend-libraries"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-532" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-05-13T16:04:55Z",
    "nvd_published_at" : "2024-05-14T15:39:29Z"
  }
}