OpenAPITools / OpenAPITools/openapi-generator

[BUG] [cpprestsdk] Security issue: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20).

Open
#10,349 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Client: C++ Issue: Bug
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Hi Expert,

Our security check tool codacy (FlawFinder) reported 4 security issues for the code of cpprestsdk.
They are all caused by std::istream::read() function usage .

https://github.com/OpenAPITools/openapi-generator/blob/master/samples/client/petstore/cpp-restsdk/client/ModelBase.cpp#L519

image

image

Would you please fix the security issue in this repo?

Regards,
Alex

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with samples/client/petstore/cpp-restsdk/client/ModelBase.cpp at the referenced std::istream::read() usage and review the four FlawFinder findings shown in the issue. Trace those generated sources or templates if applicable, then verify that the reported buffer-boundary warnings are resolved without changing generated client behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
api, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.