CVE-2024-40647 (GCVE-0-2024-40647)
Vulnerability from cvelistv5 – Published: 2024-07-18 16:51 – Updated: 2024-08-02 04:33
VLAI?
Title
Unintentional exposure of environment variables to subprocesses in sentry-sdk
Summary
sentry-sdk is the official Python SDK for Sentry.io. A bug in Sentry's Python SDK < 2.8.0 allows the environment variables to be passed to subprocesses despite the `env={}` setting. In Python's `subprocess` calls, all environment variables are passed to subprocesses by default. However, if you specifically do not want them to be passed to subprocesses, you may use `env` argument in `subprocess` calls. Due to the bug in Sentry SDK, with the Stdlib integration enabled (which is enabled by default), this expectation is not fulfilled, and all environment variables are being passed to subprocesses instead. The issue has been patched in pull request #3251 and is included in sentry-sdk==2.8.0. We strongly recommend upgrading to the latest SDK version. However, if it's not possible, and if passing environment variables to child processes poses a security risk for you, you can disable all default integrations.
Severity ?
5.3 (Medium)
CWE
- CWE-200 - Exposure of Sensitive Information to an Unauthorized Actor
Assigner
References
| URL | Tags | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|||||||||||||||||||||||
Impacted products
| Vendor | Product | Version | ||
|---|---|---|---|---|
| getsentry | sentry-python |
Affected:
< 2.8.0
|
{
"containers": {
"adp": [
{
"metrics": [
{
"other": {
"content": {
"id": "CVE-2024-40647",
"options": [
{
"Exploitation": "none"
},
{
"Automatable": "no"
},
{
"Technical Impact": "partial"
}
],
"role": "CISA Coordinator",
"timestamp": "2024-07-18T17:57:48.623412Z",
"version": "2.0.3"
},
"type": "ssvc"
}
}
],
"providerMetadata": {
"dateUpdated": "2024-07-18T17:57:55.364Z",
"orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"shortName": "CISA-ADP"
},
"title": "CISA ADP Vulnrichment"
},
{
"providerMetadata": {
"dateUpdated": "2024-08-02T04:33:11.814Z",
"orgId": "af854a3a-2127-422b-91ae-364da2661108",
"shortName": "CVE"
},
"references": [
{
"name": "https://github.com/getsentry/sentry-python/security/advisories/GHSA-g92j-qhmh-64v2",
"tags": [
"x_refsource_CONFIRM",
"x_transferred"
],
"url": "https://github.com/getsentry/sentry-python/security/advisories/GHSA-g92j-qhmh-64v2"
},
{
"name": "https://github.com/getsentry/sentry-python/pull/3251",
"tags": [
"x_refsource_MISC",
"x_transferred"
],
"url": "https://github.com/getsentry/sentry-python/pull/3251"
},
{
"name": "https://github.com/getsentry/sentry-python/commit/763e40aa4cb57ecced467f48f78f335c87e9bdff",
"tags": [
"x_refsource_MISC",
"x_transferred"
],
"url": "https://github.com/getsentry/sentry-python/commit/763e40aa4cb57ecced467f48f78f335c87e9bdff"
},
{
"name": "https://docs.python.org/3/library/subprocess.html",
"tags": [
"x_refsource_MISC",
"x_transferred"
],
"url": "https://docs.python.org/3/library/subprocess.html"
},
{
"name": "https://docs.sentry.io/platforms/python/integrations/default-integrations",
"tags": [
"x_refsource_MISC",
"x_transferred"
],
"url": "https://docs.sentry.io/platforms/python/integrations/default-integrations"
},
{
"name": "https://docs.sentry.io/platforms/python/integrations/default-integrations/#stdlib",
"tags": [
"x_refsource_MISC",
"x_transferred"
],
"url": "https://docs.sentry.io/platforms/python/integrations/default-integrations/#stdlib"
},
{
"name": "https://github.com/getsentry/sentry-python/releases/tag/2.8.0",
"tags": [
"x_refsource_MISC",
"x_transferred"
],
"url": "https://github.com/getsentry/sentry-python/releases/tag/2.8.0"
}
],
"title": "CVE Program Container"
}
],
"cna": {
"affected": [
{
"product": "sentry-python",
"vendor": "getsentry",
"versions": [
{
"status": "affected",
"version": "\u003c 2.8.0"
}
]
}
],
"descriptions": [
{
"lang": "en",
"value": "sentry-sdk is the official Python SDK for Sentry.io. A bug in Sentry\u0027s Python SDK \u003c 2.8.0 allows the environment variables to be passed to subprocesses despite the `env={}` setting. In Python\u0027s `subprocess` calls, all environment variables are passed to subprocesses by default. However, if you specifically do not want them to be passed to subprocesses, you may use `env` argument in `subprocess` calls. Due to the bug in Sentry SDK, with the Stdlib integration enabled (which is enabled by default), this expectation is not fulfilled, and all environment variables are being passed to subprocesses instead. The issue has been patched in pull request #3251 and is included in sentry-sdk==2.8.0. We strongly recommend upgrading to the latest SDK version. However, if it\u0027s not possible, and if passing environment variables to child processes poses a security risk for you, you can disable all default integrations.\n"
}
],
"metrics": [
{
"cvssV3_1": {
"attackComplexity": "HIGH",
"attackVector": "LOCAL",
"availabilityImpact": "NONE",
"baseScore": 5.3,
"baseSeverity": "MEDIUM",
"confidentialityImpact": "HIGH",
"integrityImpact": "NONE",
"privilegesRequired": "HIGH",
"scope": "CHANGED",
"userInteraction": "NONE",
"vectorString": "CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:C/C:H/I:N/A:N",
"version": "3.1"
}
}
],
"problemTypes": [
{
"descriptions": [
{
"cweId": "CWE-200",
"description": "CWE-200: Exposure of Sensitive Information to an Unauthorized Actor",
"lang": "en",
"type": "CWE"
}
]
}
],
"providerMetadata": {
"dateUpdated": "2024-07-18T16:51:23.539Z",
"orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
"shortName": "GitHub_M"
},
"references": [
{
"name": "https://github.com/getsentry/sentry-python/security/advisories/GHSA-g92j-qhmh-64v2",
"tags": [
"x_refsource_CONFIRM"
],
"url": "https://github.com/getsentry/sentry-python/security/advisories/GHSA-g92j-qhmh-64v2"
},
{
"name": "https://github.com/getsentry/sentry-python/pull/3251",
"tags": [
"x_refsource_MISC"
],
"url": "https://github.com/getsentry/sentry-python/pull/3251"
},
{
"name": "https://github.com/getsentry/sentry-python/commit/763e40aa4cb57ecced467f48f78f335c87e9bdff",
"tags": [
"x_refsource_MISC"
],
"url": "https://github.com/getsentry/sentry-python/commit/763e40aa4cb57ecced467f48f78f335c87e9bdff"
},
{
"name": "https://docs.python.org/3/library/subprocess.html",
"tags": [
"x_refsource_MISC"
],
"url": "https://docs.python.org/3/library/subprocess.html"
},
{
"name": "https://docs.sentry.io/platforms/python/integrations/default-integrations",
"tags": [
"x_refsource_MISC"
],
"url": "https://docs.sentry.io/platforms/python/integrations/default-integrations"
},
{
"name": "https://docs.sentry.io/platforms/python/integrations/default-integrations/#stdlib",
"tags": [
"x_refsource_MISC"
],
"url": "https://docs.sentry.io/platforms/python/integrations/default-integrations/#stdlib"
},
{
"name": "https://github.com/getsentry/sentry-python/releases/tag/2.8.0",
"tags": [
"x_refsource_MISC"
],
"url": "https://github.com/getsentry/sentry-python/releases/tag/2.8.0"
}
],
"source": {
"advisory": "GHSA-g92j-qhmh-64v2",
"discovery": "UNKNOWN"
},
"title": "Unintentional exposure of environment variables to subprocesses in sentry-sdk"
}
},
"cveMetadata": {
"assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
"assignerShortName": "GitHub_M",
"cveId": "CVE-2024-40647",
"datePublished": "2024-07-18T16:51:23.539Z",
"dateReserved": "2024-07-08T16:13:15.512Z",
"dateUpdated": "2024-08-02T04:33:11.814Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.1",
"vulnerability-lookup:meta": {
"vulnrichment": {
"containers": "{\"cna\": {\"title\": \"Unintentional exposure of environment variables to subprocesses in sentry-sdk\", \"problemTypes\": [{\"descriptions\": [{\"cweId\": \"CWE-200\", \"lang\": \"en\", \"description\": \"CWE-200: Exposure of Sensitive Information to an Unauthorized Actor\", \"type\": \"CWE\"}]}], \"metrics\": [{\"cvssV3_1\": {\"attackComplexity\": \"HIGH\", \"attackVector\": \"LOCAL\", \"availabilityImpact\": \"NONE\", \"baseScore\": 5.3, \"baseSeverity\": \"MEDIUM\", \"confidentialityImpact\": \"HIGH\", \"integrityImpact\": \"NONE\", \"privilegesRequired\": \"HIGH\", \"scope\": \"CHANGED\", \"userInteraction\": \"NONE\", \"vectorString\": \"CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:C/C:H/I:N/A:N\", \"version\": \"3.1\"}}], \"references\": [{\"name\": \"https://github.com/getsentry/sentry-python/security/advisories/GHSA-g92j-qhmh-64v2\", \"tags\": [\"x_refsource_CONFIRM\"], \"url\": \"https://github.com/getsentry/sentry-python/security/advisories/GHSA-g92j-qhmh-64v2\"}, {\"name\": \"https://github.com/getsentry/sentry-python/pull/3251\", \"tags\": [\"x_refsource_MISC\"], \"url\": \"https://github.com/getsentry/sentry-python/pull/3251\"}, {\"name\": \"https://github.com/getsentry/sentry-python/commit/763e40aa4cb57ecced467f48f78f335c87e9bdff\", \"tags\": [\"x_refsource_MISC\"], \"url\": \"https://github.com/getsentry/sentry-python/commit/763e40aa4cb57ecced467f48f78f335c87e9bdff\"}, {\"name\": \"https://docs.python.org/3/library/subprocess.html\", \"tags\": [\"x_refsource_MISC\"], \"url\": \"https://docs.python.org/3/library/subprocess.html\"}, {\"name\": \"https://docs.sentry.io/platforms/python/integrations/default-integrations\", \"tags\": [\"x_refsource_MISC\"], \"url\": \"https://docs.sentry.io/platforms/python/integrations/default-integrations\"}, {\"name\": \"https://docs.sentry.io/platforms/python/integrations/default-integrations/#stdlib\", \"tags\": [\"x_refsource_MISC\"], \"url\": \"https://docs.sentry.io/platforms/python/integrations/default-integrations/#stdlib\"}, {\"name\": \"https://github.com/getsentry/sentry-python/releases/tag/2.8.0\", \"tags\": [\"x_refsource_MISC\"], \"url\": \"https://github.com/getsentry/sentry-python/releases/tag/2.8.0\"}], \"affected\": [{\"vendor\": \"getsentry\", \"product\": \"sentry-python\", \"versions\": [{\"version\": \"\u003c 2.8.0\", \"status\": \"affected\"}]}], \"providerMetadata\": {\"orgId\": \"a0819718-46f1-4df5-94e2-005712e83aaa\", \"shortName\": \"GitHub_M\", \"dateUpdated\": \"2024-07-18T16:51:23.539Z\"}, \"descriptions\": [{\"lang\": \"en\", \"value\": \"sentry-sdk is the official Python SDK for Sentry.io. A bug in Sentry\u0027s Python SDK \u003c 2.8.0 allows the environment variables to be passed to subprocesses despite the `env={}` setting. In Python\u0027s `subprocess` calls, all environment variables are passed to subprocesses by default. However, if you specifically do not want them to be passed to subprocesses, you may use `env` argument in `subprocess` calls. Due to the bug in Sentry SDK, with the Stdlib integration enabled (which is enabled by default), this expectation is not fulfilled, and all environment variables are being passed to subprocesses instead. The issue has been patched in pull request #3251 and is included in sentry-sdk==2.8.0. We strongly recommend upgrading to the latest SDK version. However, if it\u0027s not possible, and if passing environment variables to child processes poses a security risk for you, you can disable all default integrations.\\n\"}], \"source\": {\"advisory\": \"GHSA-g92j-qhmh-64v2\", \"discovery\": \"UNKNOWN\"}}, \"adp\": [{\"title\": \"CISA ADP Vulnrichment\", \"metrics\": [{\"other\": {\"type\": \"ssvc\", \"content\": {\"id\": \"CVE-2024-40647\", \"role\": \"CISA Coordinator\", \"options\": [{\"Exploitation\": \"none\"}, {\"Automatable\": \"no\"}, {\"Technical Impact\": \"partial\"}], \"version\": \"2.0.3\", \"timestamp\": \"2024-07-18T17:57:48.623412Z\"}}}], \"providerMetadata\": {\"orgId\": \"134c704f-9b21-4f2e-91b3-4a467353bcc0\", \"shortName\": \"CISA-ADP\", \"dateUpdated\": \"2024-07-18T17:57:52.654Z\"}}]}",
"cveMetadata": "{\"cveId\": \"CVE-2024-40647\", \"assignerOrgId\": \"a0819718-46f1-4df5-94e2-005712e83aaa\", \"state\": \"PUBLISHED\", \"assignerShortName\": \"GitHub_M\", \"dateReserved\": \"2024-07-08T16:13:15.512Z\", \"datePublished\": \"2024-07-18T16:51:23.539Z\", \"dateUpdated\": \"2024-07-18T17:57:55.364Z\"}",
"dataType": "CVE_RECORD",
"dataVersion": "5.1"
}
}
}
Loading…
Loading…
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Loading…
Loading…