# US 2022/0035928 A1 · Detecting exploitable paths in application software that uses third-party libraries

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2022/0035928 A1
- Document ID: US20220035928A1
- Status: Published application
- Kind: A1
- Application number: 17/382,390
- Filed: 2021-07-22
- Published: 2022-02-03
- Earliest claimed: 2020-07-28
- Assignees: Checkmarx Ltd.
- Applicants: Checkmarx Ltd.
- Inventors: Maty Siman; Or Chen
- Web page: https://patentgrep.com/patent/US20220035928A1

## CPC

- G06F 21/577: {Assessing vulnerabilities and evaluating computer system security}
- G06F 8/75: Structural analysis for program understanding
- G06F 2221/033: Test or assess software
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method for software code analysis includes receiving source code of an application program, which includes one or more calls from respective entry points in the source code to a library program. The source code is automatically analyzed in order to generate a first data flow graph (DFG), representing a flow of data to be engendered upon running the application program. One or more vulnerabilities are identified in the library program. The library program is automatically analyzed to generate a second DFG linking at least one of the entry points in the source code to at least one of the vulnerabilities. The first DFG is combined with the second DFG in order to track the flow of data from the application program to the at least one of the vulnerabilities and to report at least one of the vulnerabilities as being exploitable.

## Claims

### Claim 1

A method for software code analysis, comprising:
receiving, into a memory of a computer, source code of an application program, which includes one or more calls from respective entry points in the source code to at least one library program;
automatically analyzing the source code in the computer in order to generate a first data flow graph (DFG), representing a flow of data to be engendered upon running the application program;
identifying one or more vulnerabilities in the at least one library program;
automatically analyzing the at least one library program to generate at least one second DFG linking at least one of the entry points in the source code to at least one of the vulnerabilities;
combining the first DFG with the at least one second DFG in order to track the flow of data from the application program to the at least one of the vulnerabilities; and
reporting, responsively to the tracked flow, that the at least one of the vulnerabilities is exploitable.

### Claim 2 (depends on 1)

The method according to claim 1, wherein identifying the one or more vulnerabilities comprises looking up the at least one library program in a database of known vulnerabilities.

### Claim 3 (depends on 1)

The method according to claim 1, wherein the one or more calls from the respective entry points in the source code comprise invocations of methods in an application program interface (API) of the at least one library program.

### Claim 4 (depends on 1)

The method according to claim 1, and comprising identifying at least one of the library calls by detecting an unresolved method in the source code.

### Claim 5 (depends on 1)

The method according to claim 1, wherein identifying the one or more vulnerabilities comprises identifying a vulnerable parameter in the at least one library program, and wherein automatically analyzing the at least one library program comprises finding a data flow path from the at least one of the entry points to the vulnerable parameter in the at least one library program.

### Claim 6 (depends on 5)

The method according to claim 5, wherein combining the first DFG with the at least one second DFG comprises tracking the flow of data through the first DFG and the at least one second DFG to the vulnerable parameter, and wherein the at least one of the vulnerabilities is reported to be exploitable when the tracked flow links an input of the application program to the vulnerable parameter.

### Claim 7 (depends on 6)

The method according to claim 6, wherein the at least one of the vulnerabilities is reported as not being exploitable when the tracked flow indicates that the one or more calls from the application program to the at least one library program are not accessible via a data flow from inputs of the application program.

### Claim 8 (depends on 1)

The method according to claim 1, wherein the at least one library program comprises a first library program, which includes a call to a second library program, and
wherein identifying the one or more vulnerabilities comprises identifying a vulnerability in the second library program, and
wherein automatically analyzing the at least one library program comprises generating the at least one second DFG so as to track the flow of data through the first library program to the vulnerability in the second library program.

### Claim 9

Apparatus for software code analysis, comprising:
a memory configured to receive source code of an application program, which includes one or more calls from respective entry points in the source code to at least one library program; and
a processor configured to automatically analyze the source code in the computer in order to generate a first data flow graph (DFG), representing a flow of data to be engendered upon running the application program, to identify one or more vulnerabilities in the at least one library program, to automatically analyze the at least one library program to generate at least one second DFG linking at least one of the entry points in the source code to at least one of the vulnerabilities, to combine the first DFG with the at least one second DFG in order to track the flow of data from the application program to the at least one of the vulnerabilities, and to report, responsively to the tracked flow, that the at least one of the vulnerabilities is exploitable.

### Claim 10 (depends on 9)

The apparatus according to claim 9, wherein the processor is configured to identify the one or more vulnerabilities by looking up the at least one library program in a database of known vulnerabilities.

### Claim 11 (depends on 9)

The apparatus according to claim 9, wherein the one or more calls from the respective entry points in the source code comprise invocations of methods in an application program interface (API) of the at least one library program.

### Claim 12 (depends on 9)

The apparatus according to claim 9, wherein the processor is configured to identify at least one of the library calls by detecting an unresolved method in the source code.

### Claim 13 (depends on 9)

The apparatus according to claim 9, wherein the processor is configured to identify a vulnerable parameter in the at least one library program, and to find a data flow path from the at least one of the entry points to the vulnerable parameter in the at least one library program.

### Claim 14 (depends on 13)

The apparatus according to claim 13, wherein the processor is configured to track the flow of data through the first DFG and the at least one second DFG to the vulnerable parameter, and wherein the at least one of the vulnerabilities is reported to be exploitable when the tracked flow links an input of the application program to the vulnerable parameter.

### Claim 15 (depends on 14)

The apparatus according to claim 14, wherein the at least one of the vulnerabilities is reported as not being exploitable when the tracked flow indicates that the one or more calls from the application program to the at least one library program are not accessible via a data flow from inputs of the application program.

### Claim 16 (depends on 9)

The apparatus according to claim 9, wherein the at least one library program comprises a first library program, which includes a call to a second library program, and
wherein the processor is configured to identify a vulnerability in the second library program and to generate the at least one second DFG so as to track the flow of data through the first library program to the vulnerability in the second library program.

### Claim 17

A computer software product, comprising a non-transitory computer-readable medium in which program instructions are stored, which instructions, when read by a computer, cause the computer to receive source code of an application program, which includes one or more calls from respective entry points in the source code to at least one library program, to automatically analyze the source code in the computer in order to generate a first data flow graph (DFG), representing a flow of data to be engendered upon running the application program, to identify one or more vulnerabilities in the at least one library program, to automatically analyze the at least one library program to generate at least one second DFG linking at least one of the entry points in the source code to at least one of the vulnerabilities, to combine the first DFG with the at least one second DFG in order to track the flow of data from the application program to the at least one of the vulnerabilities, and to report, responsively to the tracked flow, that the at least one of the vulnerabilities is exploitable.

### Claim 18 (depends on 17)

The product according to claim 17, wherein the instructions cause the computer to identify the one or more vulnerabilities by looking up the at least one library program in a database of known vulnerabilities.

### Claim 19 (depends on 17)

The product according to claim 17, wherein the one or more calls from the respective entry points in the source code comprise invocations of methods in an application program interface (API) of the at least one library program.

### Claim 20 (depends on 17)

The product according to claim 17, wherein the instructions cause the computer to identify at least one of the library calls by detecting an unresolved method in the source code.

### Claim 21 (depends on 17)

The product according to claim 17, wherein the instructions cause the computer to identify a vulnerable parameter in the at least one library program, and to find a data flow path from the at least one of the entry points to the vulnerable parameter in the at least one library program.

### Claim 22 (depends on 21)

The product according to claim 21, wherein the instructions cause the computer to track the flow of data through the first DFG and the at least one second DFG to the vulnerable parameter, and wherein the at least one of the vulnerabilities is reported to be exploitable when the tracked flow links an input of the application program to the vulnerable parameter.

### Claim 23 (depends on 22)

The product according to claim 22, wherein the at least one of the vulnerabilities is reported as not being exploitable when the tracked flow indicates that the one or more calls from the application program to the at least one library program are not accessible via a data flow from inputs of the application program.

### Claim 24 (depends on 17)

The product according to claim 17, wherein the at least one library program comprises a first library program, which includes a call to a second library program, and
wherein the instructions cause the computer to identify a vulnerability in the second library program and to generate the at least one second DFG so as to track the flow of data through the first library program to the vulnerability in the second library program.
