pysec-2024-235
Vulnerability from pysec
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
Name | purl |
---|---|
langchain-exa | pkg:pypi/langchain-exa |
{ affected: [ { package: { ecosystem: "PyPI", name: "langchain-exa", purl: "pkg:pypi/langchain-exa", }, ranges: [ { events: [ { introduced: "0", }, { fixed: "bf0b3cc0b5ade1fb95a5b1b6fa260e99064c2e22", }, { fixed: "bf0b3cc0b5ade1fb95a5b1b6fa260e99064c2e22", }, ], repo: "https://github.com/langchain-ai/langchain", type: "GIT", }, { events: [ { introduced: "0", }, { fixed: "0.1.0", }, ], type: "ECOSYSTEM", }, ], versions: [ "0.0.1", ], }, ], aliases: [ "CVE-2024-0243", ], details: "With the following crawler configuration:\n\n```python\nfrom bs4 import BeautifulSoup as Soup\n\nurl = \"https://example.com\"\nloader = RecursiveUrlLoader(\n url=url, max_depth=2, extractor=lambda x: Soup(x, \"html.parser\").text\n)\ndocs = loader.load()\n```\n\nAn 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`.\n\nhttps://github.com/langchain-ai/langchain/blob/bf0b3cc0b5ade1fb95a5b1b6fa260e99064c2e22/libs/community/langchain_community/document_loaders/recursive_url_loader.py#L51-L51\n\nResolved in https://github.com/langchain-ai/langchain/pull/15559", id: "PYSEC-2024-235", modified: "2025-02-26T02:48:56.937312+00:00", published: "2024-02-26T16:27:49+00:00", references: [ { type: "EVIDENCE", url: "https://huntr.com/bounties/370904e7-10ac-40a4-a8d4-e2d16e1ca861", }, { type: "FIX", url: "https://github.com/langchain-ai/langchain/commit/bf0b3cc0b5ade1fb95a5b1b6fa260e99064c2e22", }, { type: "FIX", url: "https://github.com/langchain-ai/langchain/pull/15559", }, { type: "REPORT", url: "https://github.com/langchain-ai/langchain/pull/15559", }, { type: "REPORT", url: "https://huntr.com/bounties/370904e7-10ac-40a4-a8d4-e2d16e1ca861", }, { type: "WEB", url: "https://huntr.com/bounties/370904e7-10ac-40a4-a8d4-e2d16e1ca861", }, ], severity: [ { score: "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H", type: "CVSS_V3", }, ], }
Log in or create an account to share your comment.
This schema specifies the format of a comment related to a security advisory.
Sightings
Author | Source | Type | Date |
---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.