🇰🇷 한글 설명
Dolibarr 23.0.4 미만 버전에서 REST API의 문서 삭제 권한 검증 오류가 발견되었습니다. 문서 삭제 시 '쓰기' 권한이 아닌 '읽기' 권한만 있어도 삭제가 가능하여, 인증된 사용자가 권한을 넘어 문서를 영구적으로 삭제할 수 있습니다.
💡 쉬운 설명
문서를 읽기만 할 수 있는 권한을 가진 사용자가 실수나 악의적인 의도로 중요한 파일을 삭제할 수 있는 보안 결함입니다. 이로 인해 송장, 주문서, PDF 파일 등이 복구 불가능하게 삭제될 위험이 있습니다.
🇺🇸 원문 (English)
Dolibarr before 23.0.4 authorizes REST API document deletion against the wrong permission. Documents::delete() in htdocs/api/class/api_documents.class.php calls dol_check_secure_access_document() with the mode argument 'read' when handling DELETE /api/index.php/documents, while the sibling builddoc() path passes 'write', the correct mode for an operation that modifies stored data. An authenticated API user who holds only a read permission for a document-bearing module, for example societe:lire or facture:lire, and no create, write, delete or admin permission, therefore passes the check and can permanently delete that module's documents: third-party files, invoices, orders, proposals, project files and generated PDFs, with no recovery path. The call site is htdocs/api/class/api_documents.class.php:1276 in 23.0.3 and passes 'write' from 23.0.4 onward.
📍 영향받는 시스템
Dolibarr versions before 23.0.4
⚔️ 공격 벡터
인증된 사용자가 권한이 낮은 API 엔드포인트를 통해 DELETE 요청을 전송하여 문서 삭제
🛡️ 대응 방법
Dolibarr를 23.0.4 이상의 최신 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 버전 정보가 23.0.4 미만인 경우 해당 취약점에 노출된 상태입니다.
curl -s http://<target_ip>/api/index.php/version | grep -E '23\[\.\d+\]'