Addressing CVE-2025-0167 vulnerability - How to upgrade curl and libcurl 8.12.0

Adewuni Olufunso 20 Reputation points
2025-04-22T14:21:48.47+00:00

Hi team, please I need a step-by-step approach to upgrade curl and libcurl from 8.9.1.0 to 8.12.0. First I will like to understand what type of file should I download? I plan to install on several VMs. Thanks

Visual Studio Debugging
Visual Studio Debugging
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Debugging: The act or process of detecting, locating, and correcting logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more frequently used, especially if the problem is major.
1,066 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Finlay Thomas 0 Reputation points
    2025-04-22T15:35:18.07+00:00

    To upgrade curl and libcurl from version 8.9.1.0 to 8.12.0 on several VMs, you'll want to download and install the appropriate files for your system. Here's a step-by-step approach to guide you through the process:

    Step 1: Understand your system architecture

    Before downloading the installation files, ensure you know the architecture of the VMs you're working with. Most VMs will likely run on either:

    • x86_64 (64-bit)

    i386 (32-bit)

    Make sure you download the corresponding version for your system architecture. You'll also need to identify the operating system (e.g., Ubuntu, CentOS, RedHat, etc.) so you can download the correct package.

    Step 2: Downloading the appropriate files

    There are two primary ways to upgrade curl and libcurl: by downloading precompiled binaries or by compiling from source.

    Option A: Download Precompiled Binaries (Recommended for Easy Installation)

    Precompiled binaries are faster to install and are ideal if you don't want to spend time compiling from source. These are available for many common Linux distributions.

    For Ubuntu/Debian:

    Use the package manager to upgrade curl and libcurl:

       bash
       CopyEdit
       sudo apt update
    sudo apt upgrade curl libcurl4
    
      This will automatically install the latest version available from the distribution’s package repositories, but make sure to check if the version you need is available.
      
      **For CentOS/RedHat**:
      
         Use the `yum` or `dnf` package manager to upgrade:
         
         ```
         bash
         CopyEdit
         sudo yum update curl libcurl
         ```
         
         or
         
         ```
         bash
         CopyEdit
         sudo dnf update curl libcurl
         ```
         
            Again, ensure the repositories have the version you need.
            
            **For other Linux distributions**:
            
               If you're using a different distribution, consult the documentation for your system's package manager.
               
    

    Option B: Download and Compile from Source (For Specific Versions)

    If you want to install a specific version like 8.12.0 and it’s not available in your distribution's package manager, you will need to download and compile from source.

    Go to the official curl website:

    Navigate to curl’s download page for the latest source code.

    Download the source tarball:

      Look for the version 8.12.0 source code.
      
         Choose the **tar.gz** or **tar.bz2** format for Linux.
         
         Example: Download `curl-8.12.0.tar.gz`.
         
         **Extract the tarball**:
         
            After downloading the file, extract it:
            
            ```
            bash
            CopyEdit
            tar -xvzf curl-8.12.0.tar.gz
            ```
            
            **Install dependencies (if not already installed)**:
            
               Ensure you have the necessary tools to compile `curl` and `libcurl`:
               
               ```
               bash
               CopyEdit
               sudo apt-get install build-essential
    

    sudo apt-get install libssl-dev sudo apt-get install libz-dev ```

    Step 3: Install curl and libcurl

    If Downloading Precompiled Binaries:

    For Ubuntu/Debian:

    bash
    CopyEdit
    sudo apt install curl libcurl4
    

    For CentOS/RedHat:

    bash
    CopyEdit
    sudo yum install curl libcurl
    

    For other distributions, use your package manager to install the downloaded packages.

    If Compiling from Source:

    Navigate to the extracted folder:

    bash
    CopyEdit
    cd curl-8.12.0
    

    Configure the build:

    Run the configuration script to prepare for building:

       bash
       CopyEdit
       ./configure --prefix=/usr/local
    

    Compile the source:

       bash
       CopyEdit
       make
    

    Install the compiled version:

      To install `curl` and `libcurl`, run:
      
      ```
      bash
      CopyEdit
      sudo make install
      ```
      
         This will install both `curl` and `libcurl` to `/usr/local/bin`.
         
    

    Step 4: Verify the Installation

    Once the installation is complete, verify the installed version of curl:

    bash
    CopyEdit
    curl --version
    

    It should show curl 8.12.0 if the installation was successful.

    Step 5: Installing on Multiple VMs

    To deploy this upgrade to multiple VMs, you have two options:

    Manual Installation:

    Follow the above steps individually on each VM.

    Automated Installation Using Ansible or Similar Tools:

      If you need to deploy the upgrade to many VMs, tools like **Ansible**, **Puppet**, or **Chef** can help automate the process. With Ansible, you can write a playbook to download and install `curl` on all your VMs.
      
    

    Optional: Testing Post-Installation

    Once installed, you can test libcurl by running some common cURL commands to ensure everything is working as expected.


    By following this guide, you should be able to upgrade curl and libcurl to version 8.12.0 on your VMs.To upgrade curl and libcurl from version 8.9.1.0 to 8.12.0 on several VMs, you'll want to download and install the appropriate files for your system. Here's a step-by-step approach to guide you through the process:

    Step 1: Understand your system architecture

    Before downloading the installation files, ensure you know the architecture of the VMs you're working with. Most VMs will likely run on either:

    x86_64 (64-bit)

    i386 (32-bit)

    Make sure you download the corresponding version for your system architecture. You'll also need to identify the operating system (e.g., Ubuntu, CentOS, RedHat, etc.) so you can download the correct package.

    Step 2: Downloading the appropriate files

    There are two primary ways to upgrade curl and libcurl: by downloading precompiled binaries or by compiling from source.

    Option A: Download Precompiled Binaries (Recommended for Easy Installation)

    Precompiled binaries are faster to install and are ideal if you don't want to spend time compiling from source. These are available for many common Linux distributions.

    For Ubuntu/Debian:

    Use the package manager to upgrade curl and libcurl:

       bash
       CopyEdit
       sudo apt update
    sudo apt upgrade curl libcurl4
    
      This will automatically install the latest version available from the distribution’s package repositories, but make sure to check if the version you need is available.
      
      **For CentOS/RedHat**:
      
         Use the `yum` or `dnf` package manager to upgrade:
         
         ```
         bash
         CopyEdit
         sudo yum update curl libcurl
         ```
         
         or
         
         ```
         bash
         CopyEdit
         sudo dnf update curl libcurl
         ```
         
            Again, ensure the repositories have the version you need.
            
            **For other Linux distributions**:
            
               If you're using a different distribution, consult the documentation for your system's package manager.
               
    

    Option B: Download and Compile from Source (For Specific Versions)

    If you want to install a specific version like 8.12.0 and it’s not available in your distribution's package manager, you will need to download and compile from source.

    Go to the official curl website:

    Navigate to curl’s download page for the latest source code.

    Download the source tarball:

      Look for the version 8.12.0 source code.
      
         Choose the **tar.gz** or **tar.bz2** format for Linux.
         
         Example: Download `curl-8.12.0.tar.gz`.
         
         **Extract the tarball**:
         
            After downloading the file, extract it:
            
            ```
            bash
            CopyEdit
            tar -xvzf curl-8.12.0.tar.gz
            ```
            
            **Install dependencies (if not already installed)**:
            
               Ensure you have the necessary tools to compile `curl` and `libcurl`:
               
               ```
               bash
               CopyEdit
               sudo apt-get install build-essential
    

    sudo apt-get install libssl-dev sudo apt-get install libz-dev ```

    Step 3: Install curl and libcurl

    If Downloading Precompiled Binaries:

    For Ubuntu/Debian:

    bash
    CopyEdit
    sudo apt install curl libcurl4
    

    For CentOS/RedHat:

    bash
    CopyEdit
    sudo yum install curl libcurl
    

    For other distributions, use your package manager to install the downloaded packages.

    If Compiling from Source:

    Navigate to the extracted folder:

    bash
    CopyEdit
    cd
    

    Configure the build:

    Run the configuration script to prepare for building:

       bash
       CopyEdit
       ./configure --prefix=/usr/local
    

    Compile the source:

       bash
       CopyEdit
       make
    

    Install the compiled version:

      To install `curl` and `libcurl`, run:
      
      ```
      bash
      CopyEdit
      sudo make install
      ```
      
         This will install both `curl` and `libcurl` to `/usr/local/bin`.
         
    

    Step 4: Verify the Installation

    Once the installation is complete, verify the installed version of curl:

    bash
    CopyEdit
    curl --version
    

    It should show curl 8.12.0 if the installation was successful.

    Step 5: Installing on Multiple VMs

    To deploy this upgrade to multiple VMs, you have two options:

    Manual Installation:

    Follow the above steps individually on each VM.

    Automated Installation Using Ansible or Similar Tools:

      If you need to deploy the upgrade to many VMs, tools like **Ansible**, **Puppet**, or **Chef** can help automate the process. With Ansible, you can write a playbook to download and install `curl` on all your VMs.
      
    

    Optional: Testing Post-Installation

    Once installed, you can test libcurl by running some common cURL commands to ensure everything is working as expected.


    By following this guide, you should be able to upgrade curl and libcurl to version 8.12.0 on your VMs.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.