Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

cyares

Latest version: v0.11.0

Overview

Last scanned
29 Nov 2026
Published
29 Nov 2026
PyPI package Publisher: Vizonex
7 Stars
0 Forks
2 Versions
3.0K Downloads
Python Repo language

Scan summary

cyares was last scanned on 29 Nov 2026 at version 0.11.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 2 versions; the latest was published on 29 Nov 2026.
  • Findings: No rules fired in version 0.11.0.
  • Downloads: 2,990 downloads.

Versions

2 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.11.0 LATEST 29 Nov 2026 No rules fired
0.10.0 16 Oct 2026 No rules fired

No rules fired in 0.11.0

Findings

Findings for v0.11.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.11.0; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

PyPI - Downloads License: MIT

An Upgraded version of pycares with faster and safer features.

Installation

How to install

pip install cyares

How to install with Trio bundle

pip install cyares[trio]

How to install with anyio bundle

pip install cyares[anyio]

How to install with optional IDNA Plugin

pip install cyares[idna]

How to install with optional aiohttp extension

pip install cyares[aiohttp]

Installing all bundles

pip install cyares[all]

Installing Locally & Contributing to Cyares

While this library now requires cmake (same as pycares) to handle a heavy number of operating systems, it's not the end of the world as a pypi package exists for utilizing cmake incase you don't have cmake installed on your OS. Installing cmake globally is recommended as 41MB of diskspace is required.

pip install cmake

UV Package manager is recommended for virtual environment management when it comes to testing and running cyares.

uv venv

To test that cyares compiles correctly (after activtating the virtual enviornment of course) do this.

py setup.py build_ext --inplace --cython-always

Small Examples of How to Use

from cyares import Channel

# NOTE: Dns Queries contain a Future object
# This is a little bit different from pycares
# Handles were used to prevent new or unwanted vulnerabilities along
# with easier control given to the user...
# The Future object comes from the python concurrent.futures standard library


def main():
    with Channel(servers=["8.8.8.8", "8.8.4.4"], event_thread=True) as channel:
        data = channel.query("google.com", "A").result()
    print(data)


if __name__ == "__main__":
    main()

In Asyncio

There's a module for an aiodns version if aiodns were using cyares.

import winloop  # or uvloop (asyncio will also work)
from cyares.aio import DNSResolver


async def test():
    async with DNSResolver(["8.8.8.8", "8.8.4.4"]) as dns:
        data = await dns.query("google.com", "A")
    print(data)


if __name__ == "__main__":
    winloop.run(test())

Trio

Trio is now supported as well which means this library is not just limited to synchronous python or asyncio.

from cyares.trio import DNSResolver
import trio


async def test():
    async with DNSResolver(
        ["8.8.8.8", "8.8.4.4"], rotate=True, event_thread=False
    ) as dns:
        result = await dns.query("google.com", "A")
        print(result)


if __name__ == "__main__":
    trio.run(test)

Anyio

As of 0.4.0 anyio is now supported if you need use an anyio implementation

from cyares.anyio import DNSResolver
import anyio


async def test():
    async with DNSResolver(
        ["8.8.8.8", "8.8.4.4"], rotate=True, event_thread=False
    ) as dns:
        result = await dns.query("google.com", "A")
        print(result)


if __name__ == "__main__":
    anyio.run(test)

Aiohttp

Using Globally (Monkey Patch Method)

[!WARNING] aiohttp implementation is still buggy. Use at your own risk.

install() applies a monkeypatch globally Know that if you wanted to use different resolvers with aiohttp you can do that by passing CyAresResolver through to the ClientSession. another way to avoid install() not being threadsafe is by installing before the rest of your code begins running. Same as how uvloop and winloop both work

from cyares.aiohttp import install
from aiohttp import ClientSession
import asyncio


async def main():
    # CyAres should be monkeypatched to be the default
    # DNS Resolver for this http request
    async with ClientSession() as client:
        async with client.get("https://httpbin.org/ip") as result:
            data = await result.json()
            print(f"YOUR IP ADDRESS IS: {data['origin']}")


if __name__ == "__main__":
    install()
    asyncio.run(main())

when your done with an evenloop run and want to rerun another but with an alternate dnsresolver such as aiodns or the ThreadedResolver use uninstall()

Using Non-Globally

Although slightly more tricky it is possible to pass along CyAresResolver with the right setup without resorting to install(). This will also work with aiohttp_socks or using aiohttp_socks with a proxy or tor or i2p. If you feel uncomfortable with sending this much stuff to ClientSession yourself it's encouraged to use globally with install() or via monkeypatching aiohttp's default dns resolver in your own way.

from cyares.aiohttp import CyAresResolver
from aiohttp import ClientSession, TCPConnector

# NOTE: This should also be respected when aiohttp_socks is in use
# Such as the ProxyConnector which is another connector type of it's
# own


async def main():
    async with ClientSession(connector=TCPConnector(CyAresResolver())) as client:
        async with client.get("https://httpbin.org/ip") as result:
            data = await result.json()
            print(f"YOUR IP ADDRESS IS: {data['origin']}")

In Cython

from cyares cimport Channel, Future, AresError


def dns_resolve_a(str domain):
    """Resolves IPV4 Using cython"""
    cdef Future fut
    with Channel(['8.8.8.8', '8.8.4.4'], event_thread=True) as   channel:
        fut = cannel.query(domain, "A")
    return fut.wait()

Story

As Someone who as recently started to contribute to projects such as aiohttp and a few of it's smaller libraries. The asynchronous dns resolver aiodns that aiohttp can optionally use, felt like the oddest one in the group. With aiodns using pycares under the hood I wanted to learn how it worked to see if I could use my skills to optimize it like I had previously done with propcache and multidict as well but I soon came to learn of it's many problems and when pycares started to hang on me with lingering threads when it ran, something didn't feel right to me and it lead me down a very large rabbit-hole waiting to be re-explored.

Pycares was quick, dirty and fast but as the years of it's existance went by something wasn't exactly right with it and it could use safer features, better optimization and safety practices. While cffi might be both quick and easy to use I didn't see the benefit of using it. The many vulnerabilities it was getting told me something needed to change if not big. With Pycares reaching version 5.0.0 I wanted to celebrate it the same way node-js celebrated the 10 year annversery of the original http-parser. Write a new one.

The Rewrite

While contributing to the aio-libs repos whenever I had a gap of free-time on hand while waiting on a question to be answered and when my other python libraries felt stable enough such as (deprecated-params, aiocallback, aiothreading & winloop) this is where I spent my time on. It had a total of 3 re-writes until I was satisfied with the result. Turns out just doing everything in small chunks makes all the difference.

It only felt right to me that migrating the library from cffi to cython would be the best solution to the problem. Not Rust or C, just pure-cython and small amounts of C whenever nessesary and re-changing many of the internals to incorperate a safer approch. The reason for not picking Rust is that there wasn't nessesarly a need to be memory-safe. What I cared about was speed, when people are doing DNS Lookups, speed matters and Rust did not have a friendly enough archetecture that would set a future or allow me to access the parent from the child.

There was no better canadate than to move to using handles the same way uvloop & winloop do it and having authored one of them I was familliar with this concept.

The idea was not to reinvent the wheel rather move parts of the library over in chunks and look at pycares for clues on how certain things should be laid out. At the end of the day, Pycares was the blueprint and using concurrent.futures & Cython was the cure. __Py_buffer techniques brought over from msgspec__ were utilized incase users were planning to use any bytes or string objects of any sort and I made sure the license was on it incase users wanted to know where it came from.

If there was a deprecated function with an alternative & safer approch to use I felt using it would be a better move. For example, servers are now set with the csv functions rather than the original setup and because of that change you could now set dns servers in url formats and I might possibly look at adding in yarl to be the cherry on top for those who might wish to get real creative about dns server urls.

Moving over the __ares_query function to use the dns recursion function is planned for the future (maybe after I do the first release of cyares). I still wanted to retain the original response data it gives so that migrating from pycares to cyares wouldn't be a pain to anyone who planned on moving and I also didn't want to take away from pycares either if you prefer using cffi over cython the same way curl-cffi and cycurl were both done. I have my fingers crossed that aiodns will adopt this library in the future or allow users to choose between pycares and cyares__.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • pypi-releases cyares

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Copy of Template Design OX Blog (3)
Research

Ruby2Shell: Ruby Memory Corruption Flaws Expose Applications to Remote Code Execution, But is it an Actual Risk?

Copy of Template Design OX Blog (2)
Research

NGINX2Root: Five Critical NGINX Flaws Expose Web Servers to Remote Code Execution

Critical Apache HTTP Server Flaw Exposes Web Servers to RCE (1)
CVE

CVE-2026-119618: Critical Apache HTTP Server Flaw Exposes Web Servers to Remote Code Execution

Frame 2085668439 (1)
Group 1261154229