cve-2025-47285
Vulnerability from cvelistv5
Published
2025-05-15 17:24
Modified
2025-05-15 18:37
Severity ?
EPSS score ?
Summary
Vyper's `concat()` builtin may elide side-effects for zero-length arguments
References
{ "containers": { "adp": [ { "metrics": [ { "other": { "content": { "id": "CVE-2025-47285", "options": [ { "Exploitation": "none" }, { "Automatable": "no" }, { "Technical Impact": "partial" } ], "role": "CISA Coordinator", "timestamp": "2025-05-15T18:37:27.011947Z", "version": "2.0.3" }, "type": "ssvc" } } ], "providerMetadata": { "dateUpdated": "2025-05-15T18:37:33.747Z", "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "shortName": "CISA-ADP" }, "title": "CISA ADP Vulnrichment" } ], "cna": { "affected": [ { "product": "vyper", "vendor": "vyperlang", "versions": [ { "status": "affected", "version": "\u003c= 0.4.2rc1" } ] } ], "descriptions": [ { "lang": "en", "value": "Vyper is the Pythonic Programming Language for the Ethereum Virtual Machine. In versions up to and including 0.4.2rc1, `concat()` may skip evaluation of side effects when the length of an argument is zero. This is due to a fastpath in the implementation which skips evaluation of argument expressions when their length is zero. In practice, it would be very unusual in user code to construct zero-length bytestrings using an expression with side-effects, since zero-length bytestrings are typically constructed with the empty literal `b\"\"`; the only way to construct an empty bytestring which has side effects would be with the ternary operator introduced in v0.3.8, e.g. `b\"\" if self.do_some_side_effect() else b\"\"`. The fix is available in pull request 4644 and expected to be part of the 0.4.2 release. As a workaround, don\u0027t have side effects in expressions which construct zero-length bytestrings." } ], "metrics": [ { "cvssV4_0": { "attackComplexity": "LOW", "attackRequirements": "PRESENT", "attackVector": "NETWORK", "baseScore": 2.9, "baseSeverity": "LOW", "privilegesRequired": "NONE", "subAvailabilityImpact": "NONE", "subConfidentialityImpact": "NONE", "subIntegrityImpact": "NONE", "userInteraction": "NONE", "vectorString": "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:P", "version": "4.0", "vulnAvailabilityImpact": "NONE", "vulnConfidentialityImpact": "NONE", "vulnIntegrityImpact": "LOW" } } ], "problemTypes": [ { "descriptions": [ { "cweId": "CWE-691", "description": "CWE-691: Insufficient Control Flow Management", "lang": "en", "type": "CWE" } ] } ], "providerMetadata": { "dateUpdated": "2025-05-15T17:24:03.442Z", "orgId": "a0819718-46f1-4df5-94e2-005712e83aaa", "shortName": "GitHub_M" }, "references": [ { "name": "https://github.com/vyperlang/vyper/security/advisories/GHSA-qhr6-mgqr-mchm", "tags": [ "x_refsource_CONFIRM" ], "url": "https://github.com/vyperlang/vyper/security/advisories/GHSA-qhr6-mgqr-mchm" }, { "name": "https://github.com/vyperlang/vyper/pull/4644", "tags": [ "x_refsource_MISC" ], "url": "https://github.com/vyperlang/vyper/pull/4644" }, { "name": "https://github.com/vyperlang/vyper/blob/68b68c4b30c5ef2f312b4674676170b8a6eaa316/vyper/builtins/functions.py#L560-L562", "tags": [ "x_refsource_MISC" ], "url": "https://github.com/vyperlang/vyper/blob/68b68c4b30c5ef2f312b4674676170b8a6eaa316/vyper/builtins/functions.py#L560-L562" } ], "source": { "advisory": "GHSA-qhr6-mgqr-mchm", "discovery": "UNKNOWN" }, "title": "Vyper\u0027s `concat()` builtin may elide side-effects for zero-length arguments" } }, "cveMetadata": { "assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa", "assignerShortName": "GitHub_M", "cveId": "CVE-2025-47285", "datePublished": "2025-05-15T17:24:03.442Z", "dateReserved": "2025-05-05T16:53:10.374Z", "dateUpdated": "2025-05-15T18:37:33.747Z", "state": "PUBLISHED" }, "dataType": "CVE_RECORD", "dataVersion": "5.1", "meta": { "nvd": "{\"cve\":{\"id\":\"CVE-2025-47285\",\"sourceIdentifier\":\"security-advisories@github.com\",\"published\":\"2025-05-15T18:15:38.177\",\"lastModified\":\"2025-05-16T14:43:26.160\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"Vyper is the Pythonic Programming Language for the Ethereum Virtual Machine. In versions up to and including 0.4.2rc1, `concat()` may skip evaluation of side effects when the length of an argument is zero. This is due to a fastpath in the implementation which skips evaluation of argument expressions when their length is zero. In practice, it would be very unusual in user code to construct zero-length bytestrings using an expression with side-effects, since zero-length bytestrings are typically constructed with the empty literal `b\\\"\\\"`; the only way to construct an empty bytestring which has side effects would be with the ternary operator introduced in v0.3.8, e.g. `b\\\"\\\" if self.do_some_side_effect() else b\\\"\\\"`. The fix is available in pull request 4644 and expected to be part of the 0.4.2 release. As a workaround, don\u0027t have side effects in expressions which construct zero-length bytestrings.\"},{\"lang\":\"es\",\"value\":\"Vyper es el lenguaje de programaci\u00f3n Pythonic para la M\u00e1quina Virtual de Ethereum. En versiones hasta la 0.4.2rc1 (incluida), `concat()` puede omitir la evaluaci\u00f3n de efectos secundarios cuando la longitud de un argumento es cero. Esto se debe a una ruta r\u00e1pida en la implementaci\u00f3n que omite la evaluaci\u00f3n de expresiones de argumentos cuando su longitud es cero. En la pr\u00e1ctica, ser\u00eda muy inusual en el c\u00f3digo de usuario construir cadenas de bytes de longitud cero utilizando una expresi\u00f3n con efectos secundarios, ya que estas cadenas se construyen t\u00edpicamente con el literal vac\u00edo `b\\\"\\\"`; la \u00fanica manera de construir una cadena de bytes vac\u00eda con efectos secundarios ser\u00eda con el operador ternario introducido en la v0.3.8, por ejemplo, `b\\\"\\\" if self.do_some_side_effect() else b\\\"\\\"`. La correcci\u00f3n est\u00e1 disponible en la solicitud de incorporaci\u00f3n de cambios 4644 y se espera que forme parte de la versi\u00f3n 0.4.2. Como workaround, no se deben incluir efectos secundarios en expresiones que construyen cadenas de bytes de longitud cero.\"}],\"metrics\":{\"cvssMetricV40\":[{\"source\":\"security-advisories@github.com\",\"type\":\"Secondary\",\"cvssData\":{\"version\":\"4.0\",\"vectorString\":\"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:P/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X\",\"baseScore\":2.9,\"baseSeverity\":\"LOW\",\"attackVector\":\"NETWORK\",\"attackComplexity\":\"LOW\",\"attackRequirements\":\"PRESENT\",\"privilegesRequired\":\"NONE\",\"userInteraction\":\"NONE\",\"vulnConfidentialityImpact\":\"NONE\",\"vulnIntegrityImpact\":\"LOW\",\"vulnAvailabilityImpact\":\"NONE\",\"subConfidentialityImpact\":\"NONE\",\"subIntegrityImpact\":\"NONE\",\"subAvailabilityImpact\":\"NONE\",\"exploitMaturity\":\"PROOF_OF_CONCEPT\",\"confidentialityRequirement\":\"NOT_DEFINED\",\"integrityRequirement\":\"NOT_DEFINED\",\"availabilityRequirement\":\"NOT_DEFINED\",\"modifiedAttackVector\":\"NOT_DEFINED\",\"modifiedAttackComplexity\":\"NOT_DEFINED\",\"modifiedAttackRequirements\":\"NOT_DEFINED\",\"modifiedPrivilegesRequired\":\"NOT_DEFINED\",\"modifiedUserInteraction\":\"NOT_DEFINED\",\"modifiedVulnConfidentialityImpact\":\"NOT_DEFINED\",\"modifiedVulnIntegrityImpact\":\"NOT_DEFINED\",\"modifiedVulnAvailabilityImpact\":\"NOT_DEFINED\",\"modifiedSubConfidentialityImpact\":\"NOT_DEFINED\",\"modifiedSubIntegrityImpact\":\"NOT_DEFINED\",\"modifiedSubAvailabilityImpact\":\"NOT_DEFINED\",\"Safety\":\"NOT_DEFINED\",\"Automatable\":\"NOT_DEFINED\",\"Recovery\":\"NOT_DEFINED\",\"valueDensity\":\"NOT_DEFINED\",\"vulnerabilityResponseEffort\":\"NOT_DEFINED\",\"providerUrgency\":\"NOT_DEFINED\"}}]},\"weaknesses\":[{\"source\":\"security-advisories@github.com\",\"type\":\"Primary\",\"description\":[{\"lang\":\"en\",\"value\":\"CWE-691\"}]}],\"references\":[{\"url\":\"https://github.com/vyperlang/vyper/blob/68b68c4b30c5ef2f312b4674676170b8a6eaa316/vyper/builtins/functions.py#L560-L562\",\"source\":\"security-advisories@github.com\"},{\"url\":\"https://github.com/vyperlang/vyper/pull/4644\",\"source\":\"security-advisories@github.com\"},{\"url\":\"https://github.com/vyperlang/vyper/security/advisories/GHSA-qhr6-mgqr-mchm\",\"source\":\"security-advisories@github.com\"}]}}" } }
Loading...
Loading...
- 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.