diff --git a/advisories/github-reviewed/2024/11/GHSA-6q3q-6v5j-h6vg/GHSA-6q3q-6v5j-h6vg.json b/advisories/github-reviewed/2024/11/GHSA-6q3q-6v5j-h6vg/GHSA-6q3q-6v5j-h6vg.json new file mode 100644 index 00000000000..7118004f6d3 --- /dev/null +++ b/advisories/github-reviewed/2024/11/GHSA-6q3q-6v5j-h6vg/GHSA-6q3q-6v5j-h6vg.json @@ -0,0 +1,138 @@ +{ + "schema_version": "1.4.0", + "id": "GHSA-6q3q-6v5j-h6vg", + "modified": "2024-11-27T19:00:53Z", + "published": "2024-11-27T19:00:53Z", + "aliases": [ + "CVE-2024-49203" + ], + "summary": "Querydsl vulnerable to HQL injection trough orderBy", + "details": "### Summary\nThe order by method enables injecting HQL queries. This may cause blind HQL injection, which could lead to leakage of sensitive information, and potentially also Denial Of Service. This vulnerability is present since the original querydsl repository(https://github.com/querydsl/querydsl) where it was assigned preliminary CVE identifier **CVE-2024-49203**.\n\n### Details\nVulnerable code may look as follows:\n```\n@GetMapping\npublic List getProducts(@RequestParam(\"orderBy\") String orderBy) {\n JPAQuery query = new JPAQuery(entityManager).from(test);\n PathBuilder pathBuilder = new PathBuilder<>(Test.class, \"test\");\n\n OrderSpecifier order = new OrderSpecifier(Order.ASC, pathBuilder.get(orderBy));\n JPAQuery orderedQuery = query.orderBy(order);\n return orderedQuery.fetch();\n}\n```\nWhere vulnerability is either caused by ```pathBuilder.get(orderBy)``` or the ```orderBy(order)``` method itself, based on where the security checks are expected.\n\n### PoC\nFull POC code is available in repository:\nhttps://github.com/CSIRTTrizna/CVE-2024-49203/\nWhen we take a look at source code shown in Details section the functionality is as follows:\n\n1) Create JPAQuery object instance:\n```\nJPAQuery query = new JPAQuery(entityManager).from(test);\n```\n\n2) Create OrderSpecifier object instance:\n```\nPathBuilder pathBuilder = new PathBuilder<>(Test.class, \"test\");\nOrderSpecifier order = new OrderSpecifier(Order.ASC, pathBuilder.get(orderBy));\n```\nWhere orderBy variable is user provided input.\n\n3) order and run the query\n```\nJPAQuery orderedQuery = query.orderBy(order);\norderedQuery.fetch();\n```\n\nWhen user goes to URL \n```/products?orderBy=name+INTERSECT+SELECT+t+FROM+Test+t+WHERE+(SELECT+cast(pg_sleep(10) AS text))='2'+ORDER+BY+t.id```\nThe generated query will look something like this:\n```\nselect test \nfrom Test test\norder by test.name INTERSECT SELECT t FROM Test t WHERE (SELECT cast(pg_sleep(10) AS text))='2' ORDER BY t.id asc\n```\n\n#### Environment\n\nLibrary versions used in proof of concept to reproduce the vulnerability:\n```\nquerydsl-jpa: 6.8.0\nquerydsl-apt: 6.8.0\nhibernate-core: 6.1.1.Final\njakarta.persistence-api: 3.1.0\npostgresql: 42.7.4\n```\n\n### Impact\nThe vulnerability is HQL injection, so anyone using source code similar to one provided in details is exposed to potentional information leakage and denial of service.\n", + "severity": [ + { + "type": "CVSS_V3", + "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:L" + }, + { + "type": "CVSS_V4", + "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:L/SC:N/SI:N/SA:N" + } + ], + "affected": [ + { + "package": { + "ecosystem": "Maven", + "name": "io.github.openfeign.querydsl:querydsl-jpa" + }, + "ranges": [ + { + "type": "ECOSYSTEM", + "events": [ + { + "introduced": "0" + }, + { + "last_affected": "6.8.0" + } + ] + } + ] + }, + { + "package": { + "ecosystem": "Maven", + "name": "io.github.openfeign.querydsl:querydsl-apt" + }, + "ranges": [ + { + "type": "ECOSYSTEM", + "events": [ + { + "introduced": "0" + }, + { + "last_affected": "6.8.0" + } + ] + } + ] + }, + { + "package": { + "ecosystem": "Maven", + "name": "com.querydsl:querydsl-jpa" + }, + "ranges": [ + { + "type": "ECOSYSTEM", + "events": [ + { + "introduced": "0" + }, + { + "last_affected": "5.1.0" + } + ] + } + ] + }, + { + "package": { + "ecosystem": "Maven", + "name": "com.querydsl:querydsl-apt" + }, + "ranges": [ + { + "type": "ECOSYSTEM", + "events": [ + { + "introduced": "0" + }, + { + "last_affected": "5.1.0" + } + ] + } + ] + } + ], + "references": [ + { + "type": "WEB", + "url": "https://github.com/OpenFeign/querydsl/security/advisories/GHSA-6q3q-6v5j-h6vg" + }, + { + "type": "ADVISORY", + "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-49203" + }, + { + "type": "WEB", + "url": "https://github.com/querydsl/querydsl/issues/3757" + }, + { + "type": "WEB", + "url": "https://github.com/CSIRTTrizna/CVE-2024-49203" + }, + { + "type": "PACKAGE", + "url": "https://github.com/OpenFeign/querydsl" + }, + { + "type": "WEB", + "url": "https://github.com/querydsl/querydsl/releases/tag/QUERYDSL_5_1_0" + }, + { + "type": "WEB", + "url": "https://www.csirt.sk/querydsl-java-library-vulnerability-permits-sql-hql-injection.html" + } + ], + "database_specific": { + "cwe_ids": [ + "CWE-89" + ], + "severity": "HIGH", + "github_reviewed": true, + "github_reviewed_at": "2024-11-27T19:00:53Z", + "nvd_published_at": null + } +} \ No newline at end of file diff --git a/advisories/github-reviewed/2024/11/GHSA-j6vm-4r7g-x4gr/GHSA-j6vm-4r7g-x4gr.json b/advisories/github-reviewed/2024/11/GHSA-j6vm-4r7g-x4gr/GHSA-j6vm-4r7g-x4gr.json new file mode 100644 index 00000000000..50844be7697 --- /dev/null +++ b/advisories/github-reviewed/2024/11/GHSA-j6vm-4r7g-x4gr/GHSA-j6vm-4r7g-x4gr.json @@ -0,0 +1,65 @@ +{ + "schema_version": "1.4.0", + "id": "GHSA-j6vm-4r7g-x4gr", + "modified": "2024-11-27T19:01:01Z", + "published": "2024-11-27T19:01:01Z", + "aliases": [ + "CVE-2024-11862" + ], + "summary": "Devolutions.XTS.NET Vulnerable to Timing Attack on GF Multiplications", + "details": "### Impact\nTiming attacks on Galois Field multiplications in this package. Successful exploitation would effectively allow a downgrade of the security guarantees of the XTS mode to the security guarantees of ECB mode, allowing block swapping, enabling identification of identical blocks, and rendering half of the XTS key obsolete. Timing attacks require specific conditions to be exploitable.\n\n### Patches\nPatched in 2024.11.26\n\n### Workarounds\nUpgrade the package\n\n### References\nhttps://en.wikipedia.org/wiki/Timing_attack\n", + "severity": [ + { + "type": "CVSS_V4", + "score": "CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N" + } + ], + "affected": [ + { + "package": { + "ecosystem": "NuGet", + "name": "Devolutions.XTS.NET" + }, + "ranges": [ + { + "type": "ECOSYSTEM", + "events": [ + { + "introduced": "0" + }, + { + "fixed": "2024.11.26" + } + ] + } + ] + } + ], + "references": [ + { + "type": "WEB", + "url": "https://github.com/Devolutions/XTS.NET/security/advisories/GHSA-j6vm-4r7g-x4gr" + }, + { + "type": "ADVISORY", + "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-11862" + }, + { + "type": "WEB", + "url": "https://github.com/Devolutions/XTS.NET/commit/fb349d5bfb587218e8603b38ea37f03f036b57fd" + }, + { + "type": "PACKAGE", + "url": "https://github.com/Devolutions/XTS.NET" + } + ], + "database_specific": { + "cwe_ids": [ + "CWE-385" + ], + "severity": "MODERATE", + "github_reviewed": true, + "github_reviewed_at": "2024-11-27T19:01:01Z", + "nvd_published_at": "2024-11-27T15:15:25Z" + } +} \ No newline at end of file