Vulnerabilities in pkg:pypi/farm-haystack

PACKAGE
Advisory Identifier: GHSA-w7qg-j435-78qw
Advisory Summary

CVE-2023-1712 is a CRITICAL (CVSS 9.8) use of hard-coded, security-relevant constants vulnerability (CWE-547: Use of Hard-coded, Security-relevant Constants) affecting Farm haystack libraries in the PyPI ecosystem. The issue involves use of hard-coded, security-relevant constants in deepset-ai/haystack. Remediation is available in the latest vendor maintenance releases.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/farm-haystack

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/farm-haystack. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-w7qg-j435-78qw CVE-2023-1712 CRITICAL Use of hard-coded, security-relevant constants in deepset-ai/haystack

CVE-2023-1712 at a Glance

CVE Identifier CVE-2023-1712
GHSA Identifier GHSA-w7qg-j435-78qw
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-547: Use of Hard-coded, Security-relevant Constants
Affected Product Farm haystack
Package Ecosystem PyPI
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-2023-1712

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

farm-haystack fixed: Latest secure release
pip install farm-haystack>=Latest secure release
Verify Direct and Transitive Dependencies

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

pip show farm-haystack

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2023-1712, inspect your installed packages using pip:

pip show farm-haystack

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

Note: The pip show farm-haystack command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-547: Use of Hard-coded, Security-relevant Constants, where the product uses hard-coded constants instead of symbolic names for security-critical values, which increases the likelihood of mistakes during code maintenance or security policy change. In Farm haystack, 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

Use of Hard-coded, Security-relevant Constants in GitHub repository deepset-ai/haystack in version 1.15.0 and prior. A patch is available at commit 5fc84904f198de661d5b933fde756aa922bf09f1.

CVE-2023-1712 Affected Farm haystack Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
farm-haystack
PyPI
≤ 1.15.0

References

Frequently Asked Questions

What is CVE-2023-1712?
CVE-2023-1712 is a security vulnerability in Farm haystack involving Use of hard-coded, security-relevant constants in deepset-ai/haystack under CWE-547: Use of Hard-coded, Security-relevant Constants.
Which Farm haystack versions are affected?
Affected versions include releases prior to current release patches across affected packages: farm-haystack.
What version fixes CVE-2023-1712?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is farm-haystack affected?
Yes, farm-haystack is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2023-1712?
CVE-2023-1712 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-2023-1712?
CVE-2023-1712 is classified under CWE-547: Use of Hard-coded, Security-relevant Constants (The product uses hard-coded constants instead of symbolic names for security-critical values, which increases the likelihood of mistakes during code maintenance or security policy change.).
How can I check PyPI dependencies for CVE-2023-1712?
Run the dependency tree command: 'pip show farm-haystack'. 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-w7qg-j435-78qw",
  "modified" : "2023-04-06T22:53:10Z",
  "published" : "2023-03-30T12:30:15Z",
  "aliases" : [ "CVE-2023-1712" ],
  "summary" : "Use of hard-coded, security-relevant constants in deepset-ai/haystack",
  "details" : "Use of Hard-coded, Security-relevant Constants in GitHub repository deepset-ai/haystack in version 1.15.0 and prior. A patch is available at commit 5fc84904f198de661d5b933fde756aa922bf09f1.",
  "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" : "PyPI",
      "name" : "farm-haystack"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "1.15.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-1712"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/deepset-ai/haystack/pull/4535"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/deepset-ai/haystack/commit/5fc84904f198de661d5b933fde756aa922bf09f1"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/deepset-ai/haystack"
  }, {
    "type" : "WEB",
    "url" : "https://huntr.dev/bounties/9a6b1fb4-ec9b-4cfa-af1e-9ce304924829"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-547" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-03-30T22:55:51Z",
    "nvd_published_at" : "2023-03-30T10:15:00Z"
  }
}