🇰🇷 한글 설명
GraphiQL 1.4.7 미만 버전에서 발생하는 취약점으로, 조작된 HTTP 스키마 인트로스펙션 응답이나 악성 GraphQL 타입 이름을 통해 동적 XSS 공격이 가능합니다. 공격자가 사용자가 취약한 스키마를 로드하도록 유도할 경우, 자동 완성 기능 실행 시 코드 주입이 발생할 수 있습니다.
💡 쉬운 설명
그래프QL 도구인 GraphiQL에서 가짜 정보를 입력받아 사용자의 브라우저에서 악성 코드를 실행시키는 보안 약점입니다. 공격자가 만든 특수한 주소를 통해 접속하면 사용자의 권한으로 해로운 동작을 수행할 수 있습니다.
🇺🇸 원문 (English)
GraphiQL is the reference implementation of this monorepo, GraphQL IDE, an official project under the GraphQL Foundation. All versions of graphiql older than
[email protected] are vulnerable to compromised HTTP schema introspection responses or schema prop values with malicious GraphQL type names, exposing a dynamic XSS attack surface that can allow code injection on operation autocomplete. In order for the attack to take place, the user must load a vulnerable schema in graphiql. There are a number of ways that can occur. By default, the schema URL is not attacker-controllable in graphiql or in its suggested implementations or examples, leaving only very complex attack vectors. If a custom implementation of graphiql's fetcher allows the schema URL to be set dynamically, such as a URL query parameter like ?endpoint= in graphql-playground, or a database provided value, then this custom graphiql implementation is vulnerable to phishing attacks, and thus much more readily available, low or no privelege level xss attacks. The URLs could look like any generic looking graphql schema URL. It should be noted that desktop clients such as Altair, Insomnia, Postwoman, do not appear to be impacted by this. This vulnerability does not impact codemirror-graphql, monaco-graphql or other dependents, as it exists in onHasCompletion.ts in graphiql. It does impact all forks of graphiql, and every released version of graphiql.
📍 영향받는 시스템
graphiql 버전 1.4.7 미만 모든 버전 및 모든 포크(fork) 버전
⚔️ 공격 벡터
사용자가 공격자가 조작한 스키마 URL을 로드하도록 유도하여 자동 완성 기능 시 XSS 실행
🛡️ 대응 방법
GraphiQL을 1.4.7 이상의 최신 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 graphiql의 버전이 1.4.7 미만인지 확인하십시오.
npm list graphiql || yarn list --pattern graphiql