Versions of the package raysan5/raylib before 4.5.0 are vulnerable to Cross-site Scripting (XSS) such that the SetClipboardText API does not properly escape the ' character, allowing attacker-controlled input to break out of the string and execute arbitrary JavaScript via emscriptenrunscript function.
Note: This vulnerability is present only when compiling raylib for PLATFORM_WEB. All the other Desktop/Mobile/Embedded platforms are not affected.
[
{
"signature_version": "v1",
"source": "https://github.com/raysan5/raylib/commit/b436c8d7e5346a241b00511a11585936895d959d",
"id": "CVE-2023-26123-4e2496b3",
"deprecated": false,
"target": {
"file": "src/rcore.c",
"function": "SetClipboardText"
},
"signature_type": "Function",
"digest": {
"function_hash": "41329347419734723558561420860892878095",
"length": 236.0
}
},
{
"signature_version": "v1",
"source": "https://github.com/raysan5/raylib/commit/b436c8d7e5346a241b00511a11585936895d959d",
"id": "CVE-2023-26123-537dc9fb",
"deprecated": false,
"target": {
"file": "src/rcore.c",
"function": "TakeScreenshot"
},
"signature_type": "Function",
"digest": {
"function_hash": "95396039044598347856998703457630442817",
"length": 936.0
}
},
{
"signature_version": "v1",
"source": "https://github.com/raysan5/raylib/commit/b436c8d7e5346a241b00511a11585936895d959d",
"id": "CVE-2023-26123-550b2626",
"deprecated": false,
"target": {
"file": "src/rcore.c",
"function": "GetClipboardText"
},
"signature_type": "Function",
"digest": {
"function_hash": "110317313863018853267168855357997188970",
"length": 443.0
}
},
{
"signature_version": "v1",
"source": "https://github.com/raysan5/raylib/commit/b436c8d7e5346a241b00511a11585936895d959d",
"id": "CVE-2023-26123-99fbe797",
"deprecated": false,
"target": {
"file": "src/rcore.c",
"function": "OpenURL"
},
"signature_type": "Function",
"digest": {
"function_hash": "164148737505169253054324280564101103151",
"length": 2054.0
}
},
{
"signature_version": "v1",
"source": "https://github.com/raysan5/raylib/commit/b436c8d7e5346a241b00511a11585936895d959d",
"id": "CVE-2023-26123-fc8318f7",
"deprecated": false,
"target": {
"file": "src/rcore.c"
},
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"32934586593772336908919964766218732816",
"292577221545442391438029834382652359261",
"12187908305032152799688219310076510328",
"86207086325609686174765683039731179257",
"118181487026220434735613591773537399492",
"231972655437726168945768662483965489761",
"101042589994435688174658729297630513762",
"102315135139518680777821178792686834151",
"223632566967923960062951305016844513338",
"82460867418613074251510485276858101925",
"307409158455207886195930030106246530693",
"251283521399508748766556159128238157277",
"103526175660519447404867082149257442793",
"130304515847310512332484270596228411030",
"38670544352147231526459958535618144686",
"158392275212931370213822783197556741617",
"163693579294237792067088239457645805823",
"158233148284383865134124550249426916381",
"65436264917782824156953891376843276347",
"158376806962760377084192736201878689657",
"70371060100029468243395863517459848280"
]
}
}
]