Server-side Request Forgery In Recursive URL Loader (langchain-ai langchain-ai/langchain)

CVE-2024-0243
LOW 3.7

At a glance

Source
NVD
EPSS
EPSS 0.52 % · percentile 44 ()
State
PUBLISHED
Published
Updated
Assigner
@huntr_ai
NVD status
Analyzed

Description

With the following crawler configuration: ```python from bs4 import BeautifulSoup as Soup url = "https://example.com" loader = RecursiveUrlLoader( url=url, max_depth=2, extractor=lambda x: Soup(x, "html.parser").text ) docs = loader.load() ``` An attacker in control of the contents of `https://example.com` could place a malicious HTML file in there with links like "https://example.completely.different/my_file.html" and the crawler would proceed to download that file as well even though `prevent_outside=True`. https://github.com/langchain-ai/langchain/blob/bf0b3cc0b5ade1fb95a5b1b6fa260e99064c2e22/libs/community/langchain_community/document_loaders/recursive_url_loader.py#L51-L51 Resolved in https://github.com/langchain-ai/langchain/pull/15559

Weaknesses (CWE)

  • CWE-918 — Server-Side Request Forgery

References

Scores

VersionScoreVectorScored by
CVSS 3.0LOW 3.7CVSS:3.0/AV:L/AC:H/PR:H/UI:R/S:C/C:L/I:L/A:N@huntr_ai
CVSS 3.1HIGH 8.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:HNVD · nvd@nist.gov (Primary)
CVSS 3.0LOW 3.7CVSS:3.0/AV:L/AC:H/PR:H/UI:R/S:C/C:L/I:L/A:NNVD · security@huntr.dev (Secondary)

Advisories

European references

CERT-FR advisories

Affected configurations (NVD CPE)

Affected products

ProductVersions
langchain-ai · langchain-ai/langchainaffected unspecified < 0.1.0

Sources

SourceLicence
CVE List (CVEProject cvelistV5)CVE Program Terms of Use
EPSS (FIRST.org)FIRST — attribution requested
ENISA EUVDENISA — reproduction authorised, source acknowledged
CERT-FR (ANSSI)Licence Ouverte / Etalab 2.0
NVD (NIST) via fkie-cad/nvd-json-data-feedsPublic domain — this product uses data from the NVD API but is not endorsed or certified by the NVD