CVE-2022-39379: Fluentd Remote Code Execution Vulnerability

LOW
Advisory Identifier: GHSA-fppq-mj76-fpj2
CVSS 3.1
CWE-502
Published
Advisory Summary

CVE-2022-39379 is a LOW (CVSS 3.1) remote code execution vulnerability (CWE-502: Deserialization of Untrusted Data) affecting Fluentd libraries in the RubyGems ecosystem. The issue involves fluentd vulnerable to remote code execution due to insecure deserialization (in non-default configuration). Remediation is available by upgrading affected packages to version 1.15.3.

CVE-2022-39379 at a Glance

CVE Identifier CVE-2022-39379
GHSA Identifier GHSA-fppq-mj76-fpj2
Severity LOW
CVSS v3.1 Base Score 3.1
CWE Classification CWE-502: Deserialization of Untrusted Data
Affected Product Fluentd
Package Ecosystem RubyGems
Published Date
Last Updated

Security Impact

CVSS: 3.1

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

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

How to Fix CVE-2022-39379

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

fluentd fixed: 1.15.3
Upgrade fluentd to 1.15.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 fluentd

How to Check if You Are Affected

To determine whether your application is affected by CVE-2022-39379, inspect your project dependencies for Fluentd:

inspect dependencies for fluentd

Analyze the terminal output to locate any version of Fluentd in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.15.3), 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-502: Deserialization of Untrusted Data, where the product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid. In Fluentd, 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 A remote code execution (RCE) vulnerability in non-default configurations of Fluentd allows unauthenticated attackers to execute arbitrary code via specially crafted JSON payloads. Fluentd setups are only affected if the environment variable `FLUENT_OJ_OPTION_MODE` is explicitly set to `object`. Please note: The option FLUENT_OJ_OPTION_MODE was introduced in Fluentd version 1.13.2. Earlier versions of Fluentd are not affected by this vulnerability. ### Patches v1.15.3 ### Workarounds Do not use `FLUENT_OJ_OPTION_MODE=object`. ### References * GHSL-2022-067

CVE-2022-39379 Affected Fluentd Versions

1 component(s)
Fixed Versions:
1.15.3
Product / Package Ecosystem Affected Versions Fixed Version
fluentd
RubyGems
≥ 1.13.2
< 1.15.3
1.15.3

References

Frequently Asked Questions

What is CVE-2022-39379?
CVE-2022-39379 is a security vulnerability in Fluentd involving fluentd vulnerable to remote code execution due to insecure deserialization (in non-default configuration) under CWE-502: Deserialization of Untrusted Data.
Which Fluentd versions are affected?
Affected versions include releases prior to 1.15.3 across affected packages: fluentd.
What version fixes CVE-2022-39379?
Upgrading to 1.15.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is fluentd affected?
Yes, fluentd is affected in releases prior to 1.15.3. Upgrade your dependency to 1.15.3 or later.
What is the CVSS score of CVE-2022-39379?
CVE-2022-39379 has a CVSS v3.1 base score of 3.1 (LOW) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:N.
What CWE is associated with CVE-2022-39379?
CVE-2022-39379 is classified under CWE-502: Deserialization of Untrusted Data (The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.).
How can I check RubyGems dependencies for CVE-2022-39379?
Run the dependency tree command: 'inspect dependencies for fluentd'. 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-fppq-mj76-fpj2",
  "modified" : "2022-11-02T18:15:35Z",
  "published" : "2022-11-02T18:15:35Z",
  "aliases" : [ "CVE-2022-39379" ],
  "summary" : "fluentd vulnerable to remote code execution due to insecure deserialization (in non-default configuration)",
  "details" : "### Impact\nA remote code execution (RCE) vulnerability in non-default configurations of Fluentd  allows unauthenticated attackers to execute arbitrary code via specially crafted JSON payloads.\n\nFluentd setups are only affected if the environment variable `FLUENT_OJ_OPTION_MODE` is explicitly set to `object`.\n\nPlease note: The option FLUENT_OJ_OPTION_MODE was introduced in Fluentd version 1.13.2. Earlier versions of Fluentd are not affected by this vulnerability.\n\n### Patches\nv1.15.3\n\n### Workarounds\nDo not use `FLUENT_OJ_OPTION_MODE=object`.\n\n### References\n\n* GHSL-2022-067\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "fluentd"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.13.2"
      }, {
        "fixed" : "1.15.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/fluent/fluentd/security/advisories/GHSA-fppq-mj76-fpj2"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-39379"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/fluent/fluentd/commit/48e5b85dab1b6d4c273090d538fc11b3f2fd8135"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/fluent/fluentd"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/fluentd/CVE-2022-39379.yml"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/MYD5QV66OLDHES6IKVYYM3Y3YID3VVCO"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-502" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-11-02T18:15:35Z",
    "nvd_published_at" : "2022-11-02T13:15:00Z"
  }
}