# US 11,201,894 B2 · Method, system, and computer program product for automatically mitigating vulnerabilities in source code

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

- Number: US 11,201,894 B2
- Document ID: US11201894B2
- Status: Granted
- Kind: B2
- Application number: 16/819,186
- Filed: 2020-03-16
- Published: 2020-07-09
- Granted: 2021-12-14
- Earliest claimed: 2013-05-29
- Assignees: Lucent Sky Corporation
- Applicants: Lucent Sky Corporation
- Inventors: Jim Liu; Yi-Chia Huang
- Web page: https://patentgrep.com/patent/US11201894B2

## CPC

- H04L 63/1433: {Vulnerability analysis}
- G06F 8/41: Compilation
- G06F 8/42: {Syntactic analysis}
- G06F 8/43: {Checking; Contextual analysis}
- G06F 8/443: {Optimisation}
- G06F 21/53: by executing in a restricted environment, e.g. sandbox or secure virtual machine
- G06F 21/563: {by source code analysis}
- G06F 21/577: {Assessing vulnerabilities and evaluating computer system security}
- H04L 63/14: {for detecting or protecting against malicious traffic}
- H04L 63/1425: {Traffic logging, e.g. anomaly detection}
- H04L 63/1466: {Active attacks involving interception, injection, modification, spoofing of data unit addresses, e.g. hijacking, packet injection or TCP sequence number attacks}
- G06F 21/6245: {Protecting personal data, e.g. for financial or medical purposes}
- G06F 2221/033: Test or assess software
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method, a system, and a computer program product for automatically mitigating vulnerabilities in a source code of an application are provided. The method includes the following steps. First, a path graph is built according to the source code, where the path graph includes multiple paths, and each of the paths includes multiple nodes. Multiple tainted paths are identified, where each of the tainted paths corresponds to a vulnerability. A same target node in multiple intersecting tainted paths among the tainted paths is located based on an existence of a tainted object, and multiple vulnerabilities in the target node are mitigated automatically.

## Claims

### Claim 1

A method for automatically mitigating vulnerabilities in a source code of an application comprising:
building a path graph according to the source code, wherein the path graph comprises a plurality of paths, and wherein each of the paths comprises a plurality of nodes;
identifying a plurality of tainted paths from the path graph, wherein each of the tainted paths corresponds to a vulnerability;
locating a same target node in a plurality of intersecting tainted paths among the tainted paths based on an existence of a tainted object; and
mitigating a plurality of vulnerabilities in the target node automatically comprising:
obtaining a plurality of sanitization methods corresponding to the vulnerabilities in the target node; and
mitigating the vulnerabilities in the target node automatically, based on a determination of whether any one of the sanitization methods is able to mitigate all of the vulnerabilities in the target node corresponding to all of the intersecting tainted paths, by using either only one of the sanitization methods or more than one of the sanitization methods in a priority order for sanitization.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the step of mitigating the vulnerabilities in the target node automatically comprises:
determining whether a designated sanitization method among the sanitization methods is able to mitigate all of the vulnerabilities in the target node corresponding to all of the intersecting tainted paths; and
in response that the designated sanitization method is able to mitigate all of the vulnerabilities in the target node corresponding to all of the intersecting tainted paths, mitigating all of the vulnerabilities in the target node automatically by only using the designated sanitization method.

### Claim 3 (depends on 1)

The method according to claim 1, wherein the intersecting tainted paths comprise a first tainted path and a second tainted path, wherein the sanitization methods comprise a first sanitization method corresponding to the first tainted path and a second sanitization method corresponding to the second tainted path, and wherein the step of mitigating the vulnerabilities in the target node automatically comprises:
determining whether the first sanitization method is able to mitigate both of the vulnerabilities in the target node corresponding to both the first tainted path and the second tainted path; and
in response that the first sanitization method is able to mitigate both of the vulnerabilities in the target node corresponding to both the first tainted path and the second tainted path, mitigating the vulnerabilities in the target node automatically by only using the first sanitization method.

### Claim 4 (depends on 3)

The method according to claim 3, wherein the intersecting tainted paths further comprise a plurality of other tainted paths, and wherein the step of mitigating the vulnerabilities in the target node automatically further comprises:
determining whether the first sanitization method is able to mitigate vulnerabilities in the target node corresponding to the other tainted paths; and
in response that the first sanitization method is able to mitigate the vulnerability in the target node corresponding to at least one first other tainted path among the other tainted paths, mitigating the vulnerability in the target node corresponding to the at least one first other tainted path automatically by using the first sanitization method.

### Claim 5 (depends on 1)

The method according to claim 1, wherein the step of mitigating the vulnerabilities in the target node automatically comprises:
obtaining the priority order for sanitization; and
mitigating the vulnerabilities in the target node automatically by using more than one of the sanitization methods in sequence according to the priority order for sanitization.

### Claim 6 (depends on 1)

The method according to claim 1, wherein the intersecting tainted paths comprise a first tainted path and a second tainted path, wherein the sanitization methods comprise a first sanitization method corresponding to the first tainted path and a second sanitization method corresponding to the second tainted path, and wherein the step of mitigating the vulnerabilities in the target node automatically comprises:
obtaining the priority order for sanitization; and
mitigating the vulnerabilities in the target node automatically by using the first sanitization method and the second sanitization method in sequence according to the priority order for sanitization.

### Claim 7 (depends on 6)

The method according to claim 6, wherein before the step of obtaining the priority order for sanitization, the method further comprises:
setting the priority order for sanitization based on user settings.

### Claim 8 (depends on 6)

The method according to claim 6, wherein before the step of obtaining the priority order for sanitization, the method further comprises:
setting the priority order for sanitization based on a confidence score associated with a first instant-fix call corresponding to the first sanitization method and a second instant-fix call corresponding to the second sanitization method.

### Claim 9 (depends on 8)

The method according to claim 8, wherein the step of setting the priority order for sanitization based on the confidence score associated with the first instant-fix call corresponding to the first sanitization method and the second instant-fix call corresponding to the second sanitization method comprises:
obtaining a first confidence score of the target node corresponding to a first order for sanitization, wherein the first order for sanitization is to apply the first instant-fix call followed by the second instant-fix call on the target node;
obtaining a second confidence score of the target node corresponding to a second order for sanitization, wherein the second order for sanitization is to apply the second instant-fix call followed by the first instant-fix call on the target node;
setting the first order for sanitization as the priority order for sanitization in response to the first confidence score being higher than the second confidence score; and
setting the second order for sanitization as the priority order for sanitization in response to the second confidence score being higher than the first confidence score.

### Claim 10

A system for automatically mitigating vulnerabilities in a source code of an application comprising:
a memory;
a processor, coupled to the memory and configured to:
build a path graph according to the source code, wherein the path graph comprises a plurality of paths, and wherein each of the paths comprises a plurality of nodes;
identify a plurality of tainted paths from the path graph, wherein each of the tainted paths corresponds to a vulnerability;
locate a same target node in a plurality of intersecting tainted paths among the tainted paths based on an existence of a tainted object; and
mitigate a plurality of vulnerabilities in the target node automatically comprising:
obtain a plurality of sanitization methods corresponding to the vulnerabilities in the target node; and
mitigate the vulnerabilities in the target node automatically, based on a determination of whether any one of the sanitization methods is able to mitigate all of the vulnerabilities in the target node corresponding to all of the intersecting tainted paths, by using either only one of the sanitization methods or more than one of the sanitization methods in a priority order for sanitization.

### Claim 11

A non-transitory computer-readable medium comprising a plurality of program instructions, which when executed by a computer system, cause the computer system to execute steps of:
building a path graph according to the source code, wherein the path graph comprises a plurality of paths, and wherein each of the paths comprises a plurality of nodes;
identifying a plurality of tainted paths from the path graph, wherein each of the tainted paths corresponds to a vulnerability;
locating a same target node in a plurality of intersecting tainted paths among the tainted paths based on an existence of a tainted object; and
mitigating a plurality of vulnerabilities in the target node automatically mitigating a plurality of vulnerabilities in the target node automatically comprising:
obtaining a plurality of sanitization methods corresponding to the vulnerabilities in the target node; and
mitigating the vulnerabilities in the target node automatically, based on a determination of whether any one of the sanitization methods is able to mitigate all of the vulnerabilities in the target node corresponding to all of the intersecting tainted paths, by using either only one of the sanitization methods or more than one of the sanitization methods in a priority order for sanitization.
