Vulnerabilities in pkg:gem/logstash

PACKAGE
Advisory Identifier: GHSA-8qhq-rq4j-8prj
Advisory Summary

CVE-2014-4326 is a HIGH elasticsearch logstash allows remote attackers vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting Logstash libraries in the RubyGems ecosystem. The issue involves elasticsearch logstash allows remote attackers to execute arbitrary commands. Remediation is available by upgrading affected packages to version 1.4.2.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:gem/logstash

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:gem/logstash. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-8qhq-rq4j-8prj CVE-2014-4326 HIGH Elasticsearch Logstash allows remote attackers to execute arbitrary commands

CVE-2014-4326 at a Glance

CVE Identifier CVE-2014-4326
GHSA Identifier GHSA-8qhq-rq4j-8prj
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Affected Product Logstash
Package Ecosystem RubyGems
Published Date
Last Updated

How to Fix CVE-2014-4326

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

logstash fixed: 1.4.2
Upgrade logstash to 1.4.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 logstash

How to Check if You Are Affected

To determine whether your application is affected by CVE-2014-4326, inspect your project dependencies for Logstash:

inspect dependencies for logstash

Analyze the terminal output to locate any version of Logstash in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.4.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-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where the product constructs all or part of an os command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended os command when it is sent to a downstream component. In Logstash, 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

Elasticsearch Logstash 1.0.14 through 1.4.x before 1.4.2 allows remote attackers to execute arbitrary commands via a crafted event in (1) `zabbix.rb` or (2) `nagios_nsca.rb` in `outputs/`.

CVE-2014-4326 Affected Logstash Versions

1 component(s)
Fixed Versions:
1.4.2
Product / Package Ecosystem Affected Versions Fixed Version
logstash
RubyGems
≥ 1.0.14
< 1.4.2
1.4.2

References

Frequently Asked Questions

What is CVE-2014-4326?
CVE-2014-4326 is a security vulnerability in Logstash involving Elasticsearch Logstash allows remote attackers to execute arbitrary commands under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
Which Logstash versions are affected?
Affected versions include releases prior to 1.4.2 across affected packages: logstash.
What version fixes CVE-2014-4326?
Upgrading to 1.4.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is logstash affected?
Yes, logstash is affected in releases prior to 1.4.2. Upgrade your dependency to 1.4.2 or later.
What CWE is associated with CVE-2014-4326?
CVE-2014-4326 is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') (The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.).
How can I check RubyGems dependencies for CVE-2014-4326?
Run the dependency tree command: 'inspect dependencies for logstash'. 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-8qhq-rq4j-8prj",
  "modified" : "2025-04-16T17:18:13Z",
  "published" : "2022-05-14T00:58:13Z",
  "aliases" : [ "CVE-2014-4326" ],
  "summary" : "Elasticsearch Logstash allows remote attackers to execute arbitrary commands",
  "details" : "Elasticsearch Logstash 1.0.14 through 1.4.x before 1.4.2 allows remote attackers to execute arbitrary commands via a crafted event in (1) `zabbix.rb` or (2) `nagios_nsca.rb` in `outputs/`.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "logstash"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.0.14"
      }, {
        "fixed" : "1.4.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2014-4326"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/elastic/logstash"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20140804031140/http://www.elasticsearch.org/blog/logstash-1-4-2"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20201207013408/http://www.securityfocus.com/archive/1/532841/100/0/threaded"
  }, {
    "type" : "WEB",
    "url" : "https://www.elastic.co/community/security"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-78" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-04-14T16:59:20Z",
    "nvd_published_at" : "2014-07-22T14:55:00Z"
  }
}