---
id: CVE-2023-36188
aliases:
  - GHSA-57fc-8q82-gfp3
  - PYSEC-2023-109
title: langchain vulnerable to arbitrary code execution
summary: langchain vulnerable to arbitrary code execution
severity: critical
cvss: 9.8
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'
vendor: langchain
product: langchain
ecosystem: pip
affected:
  - langchain < 0.0.247
patched:
  - langchain 0.0.247
published: '2023-07-06'
updated: '2026-07-06'
source: OSV
sourceUrl: 'https://osv.dev/vulnerability/GHSA-57fc-8q82-gfp3'
references:
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2023-36188'
  - url: 'https://github.com/langchain-ai/langchain/issues/5872'
  - url: 'https://github.com/langchain-ai/langchain/pull/6003'
  - url: 'https://github.com/langchain-ai/langchain/pull/8425'
  - url: >-
      https://github.com/langchain-ai/langchain/commit/e294ba475a355feb95003ed8f1a2b99942509a9e
  - url: 'https://github.com/advisories/GHSA-57fc-8q82-gfp3'
  - url: 'https://github.com/langchain-ai/langchain'
  - url: >-
      https://github.com/pypa/advisory-database/tree/main/vulns/langchain/PYSEC-2023-109.yaml
tags:
  - osv
  - pip
epss: 0.01895
epssPercentile: 0.78721
ingestedAt: '2026-07-08T18:25:45.802Z'
---

## Overview

An issue in langchain allows a remote attacker to execute arbitrary code via the PALChain parameter in the Python exec method.

## Affected packages

- `langchain < 0.0.247`

## Remediation

Upgrade to a patched release:

- `langchain 0.0.247`
