{"id":"CVE-2024-52288","aliases":["CVE-2024-52288","GHSA-xhjw-7vh5-qxqm","PYSEC-2026-1535"],"related":[],"kind":"vulnerability","state":"published","title":"RMAC revert to the beginning of the session in libosdp","summary":"libosdp is an implementation of IEC 60839-11-5 OSDP (Open Supervised Device Protocol) and provides a C library with support for C++, Rust and Python3. In affected versions an unexpected `REPLY_CCRYPT` or `REPLY_RMAC_I` may be introduced into an active stream when they should not be. Once RMAC_I message can be sent during a session, attacker with MITM access to the communication may intercept the original RMAC_I reply and save it. While the session continues, the attacker will record all of the replies and save them, till capturing the message to be replied (can be detected by ID, length or time based on inspection of visual activity next to the reader) Once attacker captures a session with the message to be replayed, he stops resetting the connection and waits for signal to perform the replay to of the PD to CP message (ex: by signaling remotely to the MIMT device or setting a specific timing). In order to replay, the attacker will craft a specific RMAC_I message in the proper seq of the execution, which will result in reverting the RMAC to the beginning of the session. At that phase - attacker can replay all the messages from the beginning of the session. This issue has been addressed in commit `298576d9` which is included in release version 3.0.0. Users are advised to upgrade. There are no known workarounds for this vulnerability.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"libosdp is an implementation of IEC 60839-11-5 OSDP (Open Supervised Device Protocol) and provides a C library with support for C++, Rust and Python3. In affected versions an unexpected `REPLY_CCRYPT` or `REPLY_RMAC_I` may be introduced into an active stream when they should not be. Once RMAC_I message can be sent during a session, attacker with MITM access to the communication may intercept the original RMAC_I reply and save it. While the session continues, the attacker will record all of the replies and save them, till capturing the message to be replied (can be detected by ID, length or time based on inspection of visual activity next to the reader) Once attacker captures a session with the message to be replayed, he stops resetting the connection and waits for signal to perform the replay to of the PD to CP message (ex: by signaling remotely to the MIMT device or setting a specific timing). In order to replay, the attacker will craft a specific RMAC_I message in the proper seq of the execution, which will result in reverting the RMAC to the beginning of the session. At that phase - attacker can replay all the messages from the beginning of the session. This issue has been addressed in commit `298576d9` which is included in release version 3.0.0. Users are advised to upgrade. There are no known workarounds for this vulnerability.","source":"cvelist"},{"lang":"en","text":"- Issues:\n  - SCS_14 is allowed on encrypted connection (osdp_phy.c)\n  - No validation for RMAC_I is only in response to osdp_SCRYPT (osdp_cp.c)\n  - Couldn't find anything specific in the OSDP specifications indicating it is forbidden, I'm gussing it shouldn't be allowed according from the secure connection initialization flow (let me know if you think there is spec-rela\nted change that should be done)\n- Attack:\n  - Once RMAC_I message can be sent during a session, attacker with MITM access to the communication may intercept the original RMAC_I reply and save it.\n  - While the session continues, the attacker will record all of the replies and save them, till capturing the message to be replied (can be detected by ID, length or time based on inspection of visual activity next to the reade\nr)\n  - Once attacker captures a session with the message to be replayed, he stops reseting the connection and waits for signal to perform the replay to of the PD to CP message (ex: by signaling remotly to the MIMT device or setting\n a specific timing).\n  - in order to replay, the attacker will craft a specific RMAC_I message in the proper seq of the execution, which will result in reverting the RMAC to the begining of the session.\n  - At that phase - attacker can replay all the messages from the begining of the session.\n\n### Impact\nReplay attack\n\n### Patches\nThis issue has been fixed in 298576d9214b48214092eebdd892ec77be085e5a","format":"markdown","source":"ghsa"},{"lang":"es","text":"libosdp es una implementación de IEC 60839-11-5 OSDP (Open Supervised Device Protocol) y proporciona una librería C con soporte para C++, Rust y Python3. En las versiones afectadas, se puede introducir un `REPLY_CCRYPT` o `REPLY_RMAC_I` inesperado en un flujo activo cuando no debería ser así. Una vez que se puede enviar un mensaje RMAC_I durante una sesión, el atacante con acceso MITM a la comunicación puede interceptar la respuesta RMAC_I original y guardarla. Mientras la sesión continúa, el atacante registrará todas las respuestas y las guardará, hasta capturar el mensaje a ser respondido (se puede detectar por ID, longitud o tiempo en función de la inspección de la actividad visual junto al lector). Una vez que el atacante captura una sesión con el mensaje a ser reproducido, deja de restablecer la conexión y espera la señal para realizar la reproducción del mensaje PD a CP (por ejemplo: señalando remotamente al dispositivo MIMT o estableciendo un tiempo específico). Para poder reproducir, el atacante creará un mensaje RMAC_I específico en la secuencia adecuada de ejecución, lo que hará que el RMAC vuelva al principio de la sesión. En esa fase, el atacante puede reproducir todos los mensajes desde el principio de la sesión. Este problema se ha solucionado en el commit `298576d9`, que se incluye en la versión de lanzamiento 3.0.0. Se recomienda a los usuarios que actualicen. No se conocen workarounds para esta vulnerabilidad.","source":"nvd"}],"published":"2024-03-08T17:33:51.000Z","modified":"2026-07-07T17:56:55.480Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","score":5.1,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","score":5.1,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","score":5.1,"rating":"MEDIUM"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","score":5.1,"rating":"MEDIUM"}],"cwes":["CWE-924"],"affected":[{"ranges":[{"version":"< 3.0.0","status":"affected"}],"vendor":"goToMain","product":"libosdp","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"3.0.0"}],"ecosystem":"PyPI","package":"libosdp","purl":"pkg:pypi/libosdp","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"3.0.0"}],"ecosystem":"PyPI","package":"libosdp","purl":"pkg:pypi/libosdp","source":"pysec"}],"references":[{"url":"https://github.com/goToMain/libosdp/security/advisories/GHSA-xhjw-7vh5-qxqm","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/goToMain/libosdp/commit/298576d9214b48214092eebdd892ec77be085e5a","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-52288","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/goToMain/libosdp","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/libosdp","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-xhjw-7vh5-qxqm","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-11-12T14:48:07.852Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-52288","url":"https://www.cve.org/CVERecord?id=CVE-2024-52288","licence":"CVE Terms of Use","modified":"2024-11-12T14:48:17.830Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-xhjw-7vh5-qxqm","url":"https://github.com/advisories/GHSA-xhjw-7vh5-qxqm","licence":"CC-BY-4.0","modified":"2026-07-07T17:56:55.480Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-52288","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-52288","licence":"Public domain","modified":"2026-06-17T08:06:56.750Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-1535","url":"https://osv.dev/vulnerability/PYSEC-2026-1535","licence":"CC-BY-4.0","modified":"2026-07-07T17:46:51.306Z"}],"updatedAt":"2026-11-25T22:58:48.048Z","epss":{"score":0.00126,"percentile":0.02441,"date":"2026-12-01T12:00:22.000Z"}}