🔍 CVE-2026-76842

8.2
CVSS Score
HIGH
2026-08-24
2026-10-14 13:10
✅ 완료

🇰🇷 한글 설명

Mercado Pago Node.js SDK에서 사용자 입력 식별자를 API 요청 경로에 삽입할 때 퍼센트 인코딩을 수행하지 않는 취약점이 발견되었습니다. 공격자가 경로 조작 문자(.. 또는 /)를 포함한 식별자를 전달하면, SDK가 이를 정상적인 경로로 처리하여 공격자가 의도한 다른 API 엔드포인트로 요청을 리다이렉트할 수 있습니다. 이 과정에서 상점의 액세스 토큰이 포함된 상태로 요청이 전송되어 권한이 없는 리소스에 접근할 수 있게 됩니다.

💡 쉬운 설명

프로그램이 주소를 만들 때 사용자가 입력한 글자를 검사하지 않아, 주소를 마음대로 바꿔치기할 수 있는 문제입니다. 이를 통해 공격자는 원래 접근하면 안 되는 결제 정보나 환불 정보 등을 몰래 가로챌 수 있습니다.

🇺🇸 원문 (English)

The Mercado Pago Node.js SDK interpolates caller-supplied identifiers into API request paths without percent-encoding them, so characters that are structural in a URL survive into the outgoing request. The payment (get, capture, cancel), paymentRefund (create, total, list, get), advancedPayment (get, capture, cancel, update, updateReleaseDate) and disbursementRefund (create, createAll, listAll) clients build their path as a template literal, for example RestClient.fetch(`/v1/payments/${id}`, ...) in src/clients/payment/get/index.ts. A dot-dot or slash sequence in the identifier is normalised by the WHATWG URL parser and redirects the request to a different endpoint, and a question mark appends attacker-chosen query parameters, in both cases carrying the merchant's own access token. An application that forwards an identifier influenced by an untrusted party into one of these methods without an ownership check therefore allows that party to reach other resources within the merchant's token scope. The repository already contains the intended helper, encodePathParam in src/utils/path.ts, which pull request 451 applied to roughly 29 other clients while leaving these unchanged.

📍 영향받는 시스템

Mercado Pago Node.js SDK (특정 클라이언트 메서드 포함 버전)

⚔️ 공격 벡터

신뢰할 수 없는 사용자가 입력한 식별자에 경로 조작 문자(.. 또는 /)나 쿼리 파라미터(?)를 삽입하여 API 요청 경로를 조작함

🛡️ 대응 방법

식별자 입력 시 encodePathParam 헬퍼 함수를 사용하여 경로 파라미터를 퍼센트 인코딩하도록 코드를 수정함

🔧 검증 코드

설치된 SDK의 버전을 확인하여 취약점이 해결된 패치 버전인지 확인합니다.

Shell / Script
npm list @mercadopago/sdk 2>/dev/null

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N

💻 영향받는 소프트웨어

Node.js