Skip to content

--libcurl output carries --insecure across --next boundaries #22701

Description

@bagder

I did this

When --libcurl generates C source for a command that uses --next to separate multiple operations, local options from earlier operations leak into later ones. Specifically, if the first operation uses --insecure and the second does not, the generated program silently skips TLS certificate and hostname verification for the second operation. The curl CLI itself correctly rejects the untrusted certificate for the second operation (exit 60); the compiled generated program accepts it (exit 0).

(Report from Stanslav Fort, AISLE Research)

I expected the following

The output code should reflect curl behavior closer.

This was considered as a vulnerability, but deemed not because the --libcurl output is not "production ready". It should be considered an example. We should still make it as accurate as possible.

curl/libcurl version

git master

operating system

independent

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions