instruction
string | input
string | output
string | cwe_ids
list | cve_id
string | severity
string | cvss_score
float64 | repo_name
string | func_name
string | file_path
string | commit_hash
string | is_vulnerable
int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|
Analyze the following code function for security vulnerabilities
|
private boolean isNotPrivileged(StackFrame stackFrame) {
return !AccessController.class.getName().equals(stackFrame.getClassName());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isNotPrivileged
File: src/main/java/de/tum/in/test/api/security/ArtemisSecurityManager.java
Repository: ls1intum/Ares
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2024-23683
|
HIGH
| 8.2
|
ls1intum/Ares
|
isNotPrivileged
|
src/main/java/de/tum/in/test/api/security/ArtemisSecurityManager.java
|
af4f28a56e2fe600d8750b3b415352a0a3217392
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean readFilterToken(PathTokenAppender appender) {
if (!path.currentCharIs(OPEN_SQUARE_BRACKET) && !path.nextSignificantCharIs(BEGIN_FILTER)) {
return false;
}
int openStatementBracketIndex = path.position();
int questionMarkIndex = path.indexOfNextSignificantChar(BEGIN_FILTER);
if (questionMarkIndex == -1) {
return false;
}
int openBracketIndex = path.indexOfNextSignificantChar(questionMarkIndex, OPEN_PARENTHESIS);
if (openBracketIndex == -1) {
return false;
}
int closeBracketIndex = path.indexOfClosingBracket(openBracketIndex, true, true);
if (closeBracketIndex == -1) {
return false;
}
if (!path.nextSignificantCharIs(closeBracketIndex, CLOSE_SQUARE_BRACKET)) {
return false;
}
int closeStatementBracketIndex = path.indexOfNextSignificantChar(closeBracketIndex, CLOSE_SQUARE_BRACKET);
String criteria = path.subSequence(openStatementBracketIndex, closeStatementBracketIndex + 1).toString();
Predicate predicate = FilterCompiler.compile(criteria);
appender.appendPathToken(PathTokenFactory.createPredicatePathToken(predicate));
path.setPosition(closeStatementBracketIndex + 1);
return path.currentIsTail() || readNextToken(appender);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readFilterToken
File: json-path/src/main/java/com/jayway/jsonpath/internal/path/PathCompiler.java
Repository: json-path/JsonPath
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-51074
|
MEDIUM
| 5.3
|
json-path/JsonPath
|
readFilterToken
|
json-path/src/main/java/com/jayway/jsonpath/internal/path/PathCompiler.java
|
f49ff25e3bad8c8a0c853058181f2c00b5beb305
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Map<Serializable, KBTemplate> fetchByPrimaryKeys(
Set<Serializable> primaryKeys) {
if (primaryKeys.isEmpty()) {
return Collections.emptyMap();
}
Map<Serializable, KBTemplate> map = new HashMap<Serializable, KBTemplate>();
if (primaryKeys.size() == 1) {
Iterator<Serializable> iterator = primaryKeys.iterator();
Serializable primaryKey = iterator.next();
KBTemplate kbTemplate = fetchByPrimaryKey(primaryKey);
if (kbTemplate != null) {
map.put(primaryKey, kbTemplate);
}
return map;
}
Set<Serializable> uncachedPrimaryKeys = null;
for (Serializable primaryKey : primaryKeys) {
Serializable serializable = entityCache.getResult(KBTemplateModelImpl.ENTITY_CACHE_ENABLED,
KBTemplateImpl.class, primaryKey);
if (serializable != nullModel) {
if (serializable == null) {
if (uncachedPrimaryKeys == null) {
uncachedPrimaryKeys = new HashSet<Serializable>();
}
uncachedPrimaryKeys.add(primaryKey);
}
else {
map.put(primaryKey, (KBTemplate)serializable);
}
}
}
if (uncachedPrimaryKeys == null) {
return map;
}
StringBundler query = new StringBundler((uncachedPrimaryKeys.size() * 2) +
1);
query.append(_SQL_SELECT_KBTEMPLATE_WHERE_PKS_IN);
for (Serializable primaryKey : uncachedPrimaryKeys) {
query.append((long)primaryKey);
query.append(StringPool.COMMA);
}
query.setIndex(query.index() - 1);
query.append(StringPool.CLOSE_PARENTHESIS);
String sql = query.toString();
Session session = null;
try {
session = openSession();
Query q = session.createQuery(sql);
for (KBTemplate kbTemplate : (List<KBTemplate>)q.list()) {
map.put(kbTemplate.getPrimaryKeyObj(), kbTemplate);
cacheResult(kbTemplate);
uncachedPrimaryKeys.remove(kbTemplate.getPrimaryKeyObj());
}
for (Serializable primaryKey : uncachedPrimaryKeys) {
entityCache.putResult(KBTemplateModelImpl.ENTITY_CACHE_ENABLED,
KBTemplateImpl.class, primaryKey, nullModel);
}
}
catch (Exception e) {
throw processException(e);
}
finally {
closeSession(session);
}
return map;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fetchByPrimaryKeys
File: modules/apps/knowledge-base/knowledge-base-service/src/main/java/com/liferay/knowledge/base/service/persistence/impl/KBTemplatePersistenceImpl.java
Repository: brianchandotcom/liferay-portal
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2017-12647
|
MEDIUM
| 4.3
|
brianchandotcom/liferay-portal
|
fetchByPrimaryKeys
|
modules/apps/knowledge-base/knowledge-base-service/src/main/java/com/liferay/knowledge/base/service/persistence/impl/KBTemplatePersistenceImpl.java
|
ef93d984be9d4d478a5c4b1ca9a86f4e80174774
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Response processProducerAck(ProducerAck ack) throws Exception {
// A broker should not get ProducerAck messages.
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: processProducerAck
File: activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
Repository: apache/activemq
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2014-3576
|
MEDIUM
| 5
|
apache/activemq
|
processProducerAck
|
activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
|
00921f2
| 0
|
Analyze the following code function for security vulnerabilities
|
int getSelectedAction() {
return mSelectedAction;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSelectedAction
File: packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationConversationInfo.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40098
|
MEDIUM
| 5.5
|
android
|
getSelectedAction
|
packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationConversationInfo.java
|
d21ffbe8a2eeb2a5e6da7efbb1a0430ba6b022e0
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getSkinFile(String filename, boolean forceSkinAction, XWikiContext context)
{
String skinFile = getSkinFile(filename, null, forceSkinAction, context);
if (skinFile == null) {
// Use the default base skin even if the URL could be invalid.
XWikiURLFactory urlf = context.getURLFactory();
URL url;
if (forceSkinAction) {
url = urlf.createSkinURL(filename, "skins", getDefaultBaseSkin(context), context);
} else {
url = urlf.createSkinURL(filename, getDefaultBaseSkin(context), context);
}
skinFile = urlf.getURL(url, context);
}
return skinFile;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSkinFile
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-32620
|
MEDIUM
| 4
|
xwiki/xwiki-platform
|
getSkinFile
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isPackageDeviceAdmin(String packageName, int userId) {
IDevicePolicyManager dpm = IDevicePolicyManager.Stub.asInterface(
ServiceManager.getService(Context.DEVICE_POLICY_SERVICE));
try {
if (dpm != null) {
if (dpm.isDeviceOwner(packageName)) {
return true;
}
int[] users;
if (userId == UserHandle.USER_ALL) {
users = sUserManager.getUserIds();
} else {
users = new int[]{userId};
}
for (int i = 0; i < users.length; ++i) {
if (dpm.packageHasActiveAdmins(packageName, users[i])) {
return true;
}
}
}
} catch (RemoteException e) {
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isPackageDeviceAdmin
File: services/core/java/com/android/server/pm/PackageManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-119"
] |
CVE-2016-2497
|
HIGH
| 7.5
|
android
|
isPackageDeviceAdmin
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
private String getUnpauseWorkAppsForTelephonyText() {
return getUpdatableString(
WORK_PROFILE_TELEPHONY_PAUSED_BODY,
R.string.work_profile_telephony_paused_text);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUnpauseWorkAppsForTelephonyText
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
getUnpauseWorkAppsForTelephonyText
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
private Map<String, String> getMessageContent(MimeMessage message) throws Exception
{
Map<String, String> messageMap = new HashMap<>();
Address[] addresses = message.getAllRecipients();
assertTrue(addresses.length == 1);
messageMap.put("recipient", addresses[0].toString());
messageMap.put("subjectLine", message.getSubject());
Multipart mp = (Multipart) message.getContent();
BodyPart plain = getPart(mp, "text/plain");
if (plain != null) {
messageMap.put("textPart", IOUtils.toString(plain.getInputStream(), "UTF-8"));
}
BodyPart html = getPart(mp, "text/html");
if (html != null) {
messageMap.put("htmlPart", IOUtils.toString(html.getInputStream(), "UTF-8"));
}
return messageMap;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMessageContent
File: xwiki-platform-core/xwiki-platform-administration/xwiki-platform-administration-test/xwiki-platform-administration-test-docker/src/test/it/org/xwiki/administration/test/ui/ResetPasswordIT.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2021-32731
|
MEDIUM
| 5
|
xwiki/xwiki-platform
|
getMessageContent
|
xwiki-platform-core/xwiki-platform-administration/xwiki-platform-administration-test/xwiki-platform-administration-test-docker/src/test/it/org/xwiki/administration/test/ui/ResetPasswordIT.java
|
0cf716250b3645a5974c80d8336dcdf885749dff
| 0
|
Analyze the following code function for security vulnerabilities
|
private void removeRecentTasksForUserLocked(int userId) {
if(userId <= 0) {
Slog.i(TAG, "Can't remove recent task on user " + userId);
return;
}
for (int i = mRecentTasks.size() - 1; i >= 0; --i) {
TaskRecord tr = mRecentTasks.get(i);
if (tr.userId == userId) {
if(DEBUG_TASKS) Slog.i(TAG, "remove RecentTask " + tr
+ " when finishing user" + userId);
mRecentTasks.remove(i);
tr.removedFromRecents();
}
}
// Remove tasks from persistent storage.
notifyTaskPersisterLocked(null, true);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeRecentTasksForUserLocked
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-3833
|
MEDIUM
| 4.3
|
android
|
removeRecentTasksForUserLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
private MemcachedClient createMemcachedClient(long timeout, int port) throws IOException {
ConnectionFactory cf = new DefaultConnectionFactory() {
@Override
public long getOperationTimeout() {
return timeout;
}
};
if (transcoder != null) {
cf = new ConnectionFactoryBuilder(cf).setTranscoder(transcoder).build();
}
return new MemcachedClient(cf, Collections.singletonList(new InetSocketAddress("127.0.0.1", port)));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createMemcachedClient
File: integrationtests/compatibility-mode-it/src/test/java/org/infinispan/it/compatibility/CompatibilityCacheFactory.java
Repository: infinispan
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2017-15089
|
MEDIUM
| 6.5
|
infinispan
|
createMemcachedClient
|
integrationtests/compatibility-mode-it/src/test/java/org/infinispan/it/compatibility/CompatibilityCacheFactory.java
|
69be66141eee7abb1c47d46f0a6b74b079709f4b
| 0
|
Analyze the following code function for security vulnerabilities
|
private synchronized Map<AbstractProject, List<External>> getProjectExternalsCache() {
if (projectExternalsCache == null) {
projectExternalsCache = new WeakHashMap<AbstractProject, List<External>>();
}
return projectExternalsCache;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getProjectExternalsCache
File: src/main/java/hudson/scm/SubversionSCM.java
Repository: jenkinsci/subversion-plugin
The code follows secure coding practices.
|
[
"CWE-255"
] |
CVE-2013-6372
|
LOW
| 2.1
|
jenkinsci/subversion-plugin
|
getProjectExternalsCache
|
src/main/java/hudson/scm/SubversionSCM.java
|
7d4562d6f7e40de04bbe29577b51c79f07d05ba6
| 0
|
Analyze the following code function for security vulnerabilities
|
protected Class<?> resolveClass(ObjectStreamClass desc)
throws IOException,
ClassNotFoundException
{
if (!found)
{
if (!desc.getName().equals(mainClass.getName()))
{
throw new InvalidClassException(
"unexpected class: ", desc.getName());
}
else
{
found = true;
}
}
return super.resolveClass(desc);
}
|
Vulnerability Classification:
- CWE: CWE-470
- CVE: CVE-2018-1000613
- Severity: HIGH
- CVSS Score: 7.5
Description: added full filtering for BDS data.
Function: resolveClass
File: core/src/main/java/org/bouncycastle/pqc/crypto/xmss/XMSSUtil.java
Repository: bcgit/bc-java
Fixed Code:
protected Class<?> resolveClass(ObjectStreamClass desc)
throws IOException,
ClassNotFoundException
{
if (!found)
{
if (!desc.getName().equals(mainClass.getName()))
{
throw new InvalidClassException(
"unexpected class: ", desc.getName());
}
else
{
found = true;
}
}
else
{
if (!components.contains(desc.getName()))
{
throw new InvalidClassException(
"unexpected class: ", desc.getName());
}
}
return super.resolveClass(desc);
}
|
[
"CWE-470"
] |
CVE-2018-1000613
|
HIGH
| 7.5
|
bcgit/bc-java
|
resolveClass
|
core/src/main/java/org/bouncycastle/pqc/crypto/xmss/XMSSUtil.java
|
cd98322b171b15b3f88c5ec871175147893c31e6
| 1
|
Analyze the following code function for security vulnerabilities
|
protected char getExecutableQuoteDelimiter()
{
return exeQuoteDelimiter;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getExecutableQuoteDelimiter
File: src/main/java/org/codehaus/plexus/util/cli/shell/Shell.java
Repository: codehaus-plexus/plexus-utils
The code follows secure coding practices.
|
[
"CWE-78"
] |
CVE-2017-1000487
|
HIGH
| 7.5
|
codehaus-plexus/plexus-utils
|
getExecutableQuoteDelimiter
|
src/main/java/org/codehaus/plexus/util/cli/shell/Shell.java
|
b38a1b3a4352303e4312b2bb601a0d7ec6e28f41
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int addOverrideApn(@NonNull ComponentName who, @NonNull ApnSetting apnSetting) {
if (!mHasFeature || !mHasTelephonyFeature) {
return -1;
}
Objects.requireNonNull(who, "ComponentName is null");
Objects.requireNonNull(apnSetting, "ApnSetting is null in addOverrideApn");
final CallerIdentity caller = getCallerIdentity(who);
if (apnSetting.getApnTypeBitmask() == ApnSetting.TYPE_ENTERPRISE) {
Preconditions.checkCallAuthorization(isDefaultDeviceOwner(caller)
|| isManagedProfileOwner(caller));
} else {
Preconditions.checkCallAuthorization(isDefaultDeviceOwner(caller));
}
TelephonyManager tm = mContext.getSystemService(TelephonyManager.class);
if (tm != null) {
return mInjector.binderWithCleanCallingIdentity(
() -> tm.addDevicePolicyOverrideApn(mContext, apnSetting));
} else {
Slogf.w(LOG_TAG, "TelephonyManager is null when trying to add override apn");
return INVALID_APN_ID;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addOverrideApn
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2023-21284
|
MEDIUM
| 5.5
|
android
|
addOverrideApn
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean canSkipForcedPackageVerification(AndroidPackage pkg) {
final String packageName = pkg.getPackageName();
if (!VerityUtils.hasFsverity(pkg.getBaseApkPath())) {
return false;
}
// TODO: Allow base and splits to be verified individually.
String[] splitCodePaths = pkg.getSplitCodePaths();
if (!ArrayUtils.isEmpty(splitCodePaths)) {
for (int i = 0; i < splitCodePaths.length; i++) {
if (!VerityUtils.hasFsverity(splitCodePaths[i])) {
return false;
}
}
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: canSkipForcedPackageVerification
File: services/core/java/com/android/server/pm/InstallPackageHelper.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21257
|
HIGH
| 7.8
|
android
|
canSkipForcedPackageVerification
|
services/core/java/com/android/server/pm/InstallPackageHelper.java
|
1aec7feaf07e6d4568ca75d18158445dbeac10f6
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setContent(String content) {
this.content = content;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setContent
File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/log/LogOperate.java
Repository: sanluan/PublicCMS
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-21333
|
LOW
| 3.5
|
sanluan/PublicCMS
|
setContent
|
publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/log/LogOperate.java
|
b4d5956e65b14347b162424abb197a180229b3db
| 0
|
Analyze the following code function for security vulnerabilities
|
private UriPermission findUriPermissionLocked(int targetUid, GrantUri grantUri) {
final ArrayMap<GrantUri, UriPermission> targetUris = mGrantedUriPermissions.get(targetUid);
if (targetUris != null) {
return targetUris.get(grantUri);
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findUriPermissionLocked
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-3833
|
MEDIUM
| 4.3
|
android
|
findUriPermissionLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void copy(InputStream i, OutputStream o) throws IOException {
copy(i, o, 8192);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: copy
File: Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
Repository: codenameone/CodenameOne
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-4903
|
MEDIUM
| 5.1
|
codenameone/CodenameOne
|
copy
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
private String getImageFilePath(Uri uri) {
File file = new File(uri.getPath());
String scheme = uri.getScheme();
//String[] filePaths = file.getPath().split(":");
//String image_id = filePath[filePath.length - 1];
String[] filePathColumn = {MediaStore.Images.Media.DATA};
Cursor cursor = getContext().getContentResolver().query(
android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI,
new String[]{ MediaStore.Images.Media.DATA},
null,
null,
null
);
cursor.moveToFirst();
int columnIndex = cursor.getColumnIndex(filePathColumn[0]);
String filePath = cursor.getString(columnIndex);
cursor.close();
if (filePath == null || "content".equals(scheme)) {
//if the file is not on the filesystem download it and save it
//locally
try {
InputStream inputStream = getContext().getContentResolver().openInputStream(uri);
if (inputStream != null) {
String name = new File(uri.toString()).getName();//getContentName(getContext().getContentResolver(), uri);
if (name != null) {
String homePath = getAppHomePath();
if (homePath.endsWith("/")) {
homePath = homePath.substring(0, homePath.length()-1);
}
filePath = homePath
+ getFileSystemSeparator() + name;
File f = new File(removeFilePrefix(filePath));
OutputStream tmp = createFileOuputStream(f);
byte[] buffer = new byte[1024];
int read = -1;
while ((read = inputStream.read(buffer)) > -1) {
tmp.write(buffer, 0, read);
}
tmp.close();
inputStream.close();
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
//long len = new com.codename1.io.File(filePath).length();
return filePath;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getImageFilePath
File: Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
Repository: codenameone/CodenameOne
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-4903
|
MEDIUM
| 5.1
|
codenameone/CodenameOne
|
getImageFilePath
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Jooby onStart(final Throwing.Consumer<Registry> callback) {
requireNonNull(callback, "Callback is required.");
onStart.add(callback);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onStart
File: jooby/src/main/java/org/jooby/Jooby.java
Repository: jooby-project/jooby
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-7647
|
MEDIUM
| 5
|
jooby-project/jooby
|
onStart
|
jooby/src/main/java/org/jooby/Jooby.java
|
34f526028e6cd0652125baa33936ffb6a8a4a009
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void dumpCritical(FileDescriptor fd, PrintWriter pw, String[] args,
boolean asProto) {
if (asProto) return;
doDump(fd, pw, new String[]{"activities"}, asProto);
doDump(fd, pw, new String[]{"service", "all-platform-critical"}, asProto);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dumpCritical
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21292
|
MEDIUM
| 5.5
|
android
|
dumpCritical
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
protected GetMethod executeGet(String uri) throws Exception
{
GetMethod getMethod = new GetMethod(uri);
this.httpClient.executeMethod(getMethod);
return getMethod;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: executeGet
File: xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2023-35166
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
executeGet
|
xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
|
98208c5bb1e8cdf3ff1ac35d8b3d1cb3c28b3263
| 0
|
Analyze the following code function for security vulnerabilities
|
public static Info fromDOM(Element infoElement) {
Info info = new Info();
fromDOM(infoElement, info);
NodeList nameList = infoElement.getElementsByTagName("Name");
if (nameList.getLength() > 0) {
String value = nameList.item(0).getTextContent();
info.setName(value);
}
NodeList versionList = infoElement.getElementsByTagName("Version");
if (versionList.getLength() > 0) {
String value = versionList.item(0).getTextContent();
info.setVersion(value);
}
NodeList bannerList = infoElement.getElementsByTagName("Banner");
if (bannerList.getLength() > 0) {
String value = bannerList.item(0).getTextContent();
info.setName(value);
}
return info;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fromDOM
File: base/common/src/main/java/org/dogtagpki/common/Info.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
fromDOM
|
base/common/src/main/java/org/dogtagpki/common/Info.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public int getPasswordMinimumLowerCase(@Nullable ComponentName admin) {
return getPasswordMinimumLowerCase(admin, myUserId());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPasswordMinimumLowerCase
File: core/java/android/app/admin/DevicePolicyManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
getPasswordMinimumLowerCase
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
void lock() {
stateLock.lock();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: lock
File: src/main/java/com/rabbitmq/client/impl/nio/SocketChannelFrameHandlerFactory.java
Repository: rabbitmq/rabbitmq-java-client
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-46120
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-java-client
|
lock
|
src/main/java/com/rabbitmq/client/impl/nio/SocketChannelFrameHandlerFactory.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public ClassLoader getClassLoader() {
if (classLoader != null) {
return classLoader;
}
return getClass().getClassLoader();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getClassLoader
File: redisson/src/main/java/org/redisson/codec/SerializationCodec.java
Repository: redisson
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2023-42809
|
HIGH
| 8.8
|
redisson
|
getClassLoader
|
redisson/src/main/java/org/redisson/codec/SerializationCodec.java
|
fe6a2571801656ff1599ef87bdee20f519a5d1fe
| 0
|
Analyze the following code function for security vulnerabilities
|
public ApiClient setUsername(String username) {
for (Authentication auth : authentications.values()) {
if (auth instanceof HttpBasicAuth) {
((HttpBasicAuth) auth).setUsername(username);
return this;
}
}
throw new RuntimeException("No HTTP basic authentication configured!");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setUsername
File: samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
setUsername
|
samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void moveTaskToStack(int taskId, int stackId, boolean toTop) {
enforceCallingPermission(MANAGE_ACTIVITY_STACKS, "moveTaskToStack()");
if (stackId == HOME_STACK_ID) {
throw new IllegalArgumentException(
"moveTaskToStack: Attempt to move task " + taskId + " to home stack");
}
synchronized (this) {
long ident = Binder.clearCallingIdentity();
try {
if (DEBUG_STACK) Slog.d(TAG_STACK, "moveTaskToStack: moving task=" + taskId
+ " to stackId=" + stackId + " toTop=" + toTop);
if (stackId == DOCKED_STACK_ID) {
mWindowManager.setDockedStackCreateState(DOCKED_STACK_CREATE_MODE_TOP_OR_LEFT,
null /* initialBounds */);
}
boolean result = mStackSupervisor.moveTaskToStackLocked(taskId, stackId, toTop,
!FORCE_FOCUS, "moveTaskToStack", ANIMATE);
if (result && stackId == DOCKED_STACK_ID) {
// If task moved to docked stack - show recents if needed.
mStackSupervisor.moveHomeStackTaskToTop(RECENTS_ACTIVITY_TYPE,
"moveTaskToDockedStack");
}
} finally {
Binder.restoreCallingIdentity(ident);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: moveTaskToStack
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3912
|
HIGH
| 9.3
|
android
|
moveTaskToStack
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
6c049120c2d749f0c0289d822ec7d0aa692f55c5
| 0
|
Analyze the following code function for security vulnerabilities
|
private void throwIfDestroyed() {
if (mDestroyed) {
throw new IllegalStateException("cannot interact with a destroyed instance");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: throwIfDestroyed
File: services/autofill/java/com/android/server/autofill/ui/SaveUi.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-610"
] |
CVE-2023-40133
|
MEDIUM
| 5.5
|
android
|
throwIfDestroyed
|
services/autofill/java/com/android/server/autofill/ui/SaveUi.java
|
08becc8c600f14c5529115cc1a1e0c97cd503f33
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getLinkUrl() {
return linkUrl;
}
|
Vulnerability Classification:
- CWE: CWE-79
- CVE: CVE-2023-7171
- Severity: LOW
- CVSS Score: 3.3
Description: fix(novel-admin): 友情链接URL格式校验
Function: getLinkUrl
File: novel-admin/src/main/java/com/java2nb/novel/domain/FriendLinkDO.java
Repository: 201206030/novel-plus
Fixed Code:
public String getLinkUrl() {
return linkUrl;
}
|
[
"CWE-79"
] |
CVE-2023-7171
|
LOW
| 3.3
|
201206030/novel-plus
|
getLinkUrl
|
novel-admin/src/main/java/com/java2nb/novel/domain/FriendLinkDO.java
|
d6093d8182362422370d7eaf6c53afde9ee45215
| 1
|
Analyze the following code function for security vulnerabilities
|
private boolean isSupervisionComponentLocked(@Nullable ComponentName who) {
if (who == null) {
return false;
}
final String configComponent = mContext.getResources().getString(
com.android.internal.R.string.config_defaultSupervisionProfileOwnerComponent);
if (configComponent != null) {
final ComponentName componentName = ComponentName.unflattenFromString(configComponent);
if (who.equals(componentName)) {
return true;
}
}
// Check the system supervision role.
final String configPackage = mContext.getResources().getString(
com.android.internal.R.string.config_systemSupervision);
return who.getPackageName().equals(configPackage);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isSupervisionComponentLocked
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2023-21284
|
MEDIUM
| 5.5
|
android
|
isSupervisionComponentLocked
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public String toString() {
return "Form.Field(" + name + ")";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toString
File: web/play-java-forms/src/main/java/play/data/Form.java
Repository: playframework
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2022-31018
|
MEDIUM
| 5
|
playframework
|
toString
|
web/play-java-forms/src/main/java/play/data/Form.java
|
15393b736df939e35e275af2347155f296c684f2
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setActiveDragSourceComponent(
Component activeDragSourceComponent) {
this.activeDragSourceComponent = activeDragSourceComponent;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setActiveDragSourceComponent
File: flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2023-25499
|
MEDIUM
| 6.5
|
vaadin/flow
|
setActiveDragSourceComponent
|
flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java
|
428cc97eaa9c89b1124e39f0089bbb741b6b21cc
| 0
|
Analyze the following code function for security vulnerabilities
|
private void startTimeTrackingFocusedActivityLocked() {
final ActivityRecord resumedActivity = mRootWindowContainer.getTopResumedActivity();
if (!mSleeping && mCurAppTimeTracker != null && resumedActivity != null) {
mCurAppTimeTracker.start(resumedActivity.packageName);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startTimeTrackingFocusedActivityLocked
File: services/core/java/com/android/server/wm/ActivityTaskManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40094
|
HIGH
| 7.8
|
android
|
startTimeTrackingFocusedActivityLocked
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void removeAssociationsAndPresences() {
Set<String> userIds = new HashSet<>();
synchronized (_uid2Location) {
getAssociatedUserIds(userIds);
_uid2Location.clear();
}
if (_logger.isDebugEnabled()) {
_logger.debug("Broadcasting association removal for users {}", userIds);
}
SetiPresence presence = new SetiPresence(Collections.emptySet());
presence.put(SetiPresence.ALIVE_FIELD, false);
_session.getChannel(SETI_ALL_CHANNEL).publish(presence);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeAssociationsAndPresences
File: cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Seti.java
Repository: cometd
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-24721
|
MEDIUM
| 5.5
|
cometd
|
removeAssociationsAndPresences
|
cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Seti.java
|
bb445a143fbf320f17c62e340455cd74acfb5929
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onStart() {
mService = new AccountManagerService(new Injector(getContext()));
publishBinderService(Context.ACCOUNT_SERVICE, mService);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onStart
File: services/core/java/com/android/server/accounts/AccountManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-502"
] |
CVE-2023-45777
|
HIGH
| 7.8
|
android
|
onStart
|
services/core/java/com/android/server/accounts/AccountManagerService.java
|
f810d81839af38ee121c446105ca67cb12992fc6
| 0
|
Analyze the following code function for security vulnerabilities
|
public ViewPage createPageWithAttachment(EntityReference reference, String content, String title,
String attachmentName, InputStream attachmentData) throws Exception
{
return createPageWithAttachment(reference, content, title, attachmentName, attachmentData, null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createPageWithAttachment
File: xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2023-35166
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
createPageWithAttachment
|
xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
|
98208c5bb1e8cdf3ff1ac35d8b3d1cb3c28b3263
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
try {
// 执行全局过滤器
beforeAuth.run(null);
SaRouter.match(includeList).notMatch(excludeList).check(r -> {
auth.run(null);
});
} catch (StopMatchException e) {
// StopMatchException 异常代表:停止匹配,进入Controller
} catch (Throwable e) {
// 1. 获取异常处理策略结果
String result = (e instanceof BackResultException) ? e.getMessage() : String.valueOf(error.run(e));
// 2. 写入输出流
// 请注意此处默认 Content-Type 为 text/plain,如果需要返回 JSON 信息,需要在 return 前自行设置 Content-Type 为 application/json
// 例如:SaHolder.getResponse().setHeader("Content-Type", "application/json;charset=UTF-8");
if(response.getContentType() == null) {
response.setContentType("text/plain; charset=utf-8");
}
response.getWriter().print(result);
return;
}
// 执行
chain.doFilter(request, response);
}
|
Vulnerability Classification:
- CWE: CWE-Other
- CVE: CVE-2023-44794
- Severity: CRITICAL
- CVSS Score: 9.8
Description: 修复路由拦截鉴权可被绕过的问题 fix #515
Function: doFilter
File: sa-token-starter/sa-token-spring-boot3-starter/src/main/java/cn/dev33/satoken/filter/SaServletFilter.java
Repository: dromara/Sa-Token
Fixed Code:
@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
try {
// 执行全局过滤器
beforeAuth.run(null);
SaRouter.match(includeList).notMatch(excludeList).check(r -> {
auth.run(null);
});
} catch (StopMatchException e) {
// StopMatchException 异常代表:停止匹配,进入Controller
} catch (Throwable e) {
// 1. 获取异常处理策略结果
String result = (e instanceof BackResultException) ? e.getMessage() : String.valueOf(error.run(e));
// 2. 写入输出流
// 请注意此处默认 Content-Type 为 text/plain,如果需要返回 JSON 信息,需要在 return 前自行设置 Content-Type 为 application/json
// 例如:SaHolder.getResponse().setHeader("Content-Type", "application/json;charset=UTF-8");
if(response.getContentType() == null) {
response.setContentType(SaTokenConsts.CONTENT_TYPE_TEXT_PLAIN);
}
response.getWriter().print(result);
return;
}
// 执行
chain.doFilter(request, response);
}
|
[
"CWE-Other"
] |
CVE-2023-44794
|
CRITICAL
| 9.8
|
dromara/Sa-Token
|
doFilter
|
sa-token-starter/sa-token-spring-boot3-starter/src/main/java/cn/dev33/satoken/filter/SaServletFilter.java
|
954efeb73277f924f836da2a25322ea35ee1bfa3
| 1
|
Analyze the following code function for security vulnerabilities
|
private static void validateHeaderNameElement(char value) {
switch (value) {
case 0x00:
case '\t':
case '\n':
case 0x0b:
case '\f':
case '\r':
case ' ':
case ',':
case ':':
case ';':
case '=':
throw new IllegalArgumentException(
"a header name cannot contain the following prohibited characters: =,;: \\t\\r\\n\\v\\f: " +
value);
default:
// Check to see if the character is not an ASCII character, or invalid
if (value > 127) {
throw new IllegalArgumentException("a header name cannot contain non-ASCII character: " +
value);
}
}
}
|
Vulnerability Classification:
- CWE: CWE-444
- CVE: CVE-2021-43797
- Severity: MEDIUM
- CVSS Score: 4.3
Description: Merge pull request from GHSA-wx5j-54mm-rqqq
Motivation:
We should validate that only OWS is allowed before / after a header name and otherwise throw. At the moment we just "strip" everything except OWS.
Modifications:
- Adjust code to correctly validate
- Add unit tests
Result:
More strict and correct behaviour
Function: validateHeaderNameElement
File: codec-http/src/main/java/io/netty/handler/codec/http/DefaultHttpHeaders.java
Repository: netty
Fixed Code:
private static void validateHeaderNameElement(char value) {
switch (value) {
case 0x1c:
case 0x1d:
case 0x1e:
case 0x1f:
case 0x00:
case '\t':
case '\n':
case 0x0b:
case '\f':
case '\r':
case ' ':
case ',':
case ':':
case ';':
case '=':
throw new IllegalArgumentException(
"a header name cannot contain the following prohibited characters: =,;: \\t\\r\\n\\v\\f: " +
value);
default:
// Check to see if the character is not an ASCII character, or invalid
if (value > 127) {
throw new IllegalArgumentException("a header name cannot contain non-ASCII character: " +
value);
}
}
}
|
[
"CWE-444"
] |
CVE-2021-43797
|
MEDIUM
| 4.3
|
netty
|
validateHeaderNameElement
|
codec-http/src/main/java/io/netty/handler/codec/http/DefaultHttpHeaders.java
|
07aa6b5938a8b6ed7a6586e066400e2643897323
| 1
|
Analyze the following code function for security vulnerabilities
|
public boolean isManaged() {
return manager.get() != null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isManaged
File: clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseNode.java
Repository: ClickHouse/clickhouse-java
The code follows secure coding practices.
|
[
"CWE-209"
] |
CVE-2024-23689
|
HIGH
| 8.8
|
ClickHouse/clickhouse-java
|
isManaged
|
clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseNode.java
|
4f8d9303eb991b39ec7e7e34825241efa082238a
| 0
|
Analyze the following code function for security vulnerabilities
|
private MergeConflictDecisionsManager getConflictDecisionsManager()
{
if (this.conflictDecisionsManager == null) {
this.conflictDecisionsManager = Utils.getComponent(MergeConflictDecisionsManager.class);
}
return this.conflictDecisionsManager;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getConflictDecisionsManager
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/SaveAction.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2022-23617
|
MEDIUM
| 4
|
xwiki/xwiki-platform
|
getConflictDecisionsManager
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/SaveAction.java
|
30c52b01559b8ef5ed1035dac7c34aaf805764d5
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getCSPNonce() {
return Utils.generateSecurityToken(16);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCSPNonce
File: src/main/java/com/erudika/scoold/utils/ScooldUtils.java
Repository: Erudika/scoold
The code follows secure coding practices.
|
[
"CWE-130"
] |
CVE-2022-1543
|
MEDIUM
| 6.5
|
Erudika/scoold
|
getCSPNonce
|
src/main/java/com/erudika/scoold/utils/ScooldUtils.java
|
62a0e92e1486ddc17676a7ead2c07ff653d167ce
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean isInteresting() {
return mActivityRecord != null && !mAppDied
&& (!mActivityRecord.isFreezingScreen() || !mAppFreezing)
&& mViewVisibility == View.VISIBLE;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isInteresting
File: services/core/java/com/android/server/wm/WindowState.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-35674
|
HIGH
| 7.8
|
android
|
isInteresting
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
public static CMSRequestInfo fromDOM(Element infoElement) {
CMSRequestInfo info = new CMSRequestInfo();
fromDOM(infoElement, info);
return info;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fromDOM
File: base/common/src/main/java/com/netscape/certsrv/request/CMSRequestInfo.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
fromDOM
|
base/common/src/main/java/com/netscape/certsrv/request/CMSRequestInfo.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean sendAdminCommandLocked(ActiveAdmin admin, String action, Bundle adminExtras,
BroadcastReceiver result, boolean inForeground) {
Intent intent = new Intent(action);
intent.setComponent(admin.info.getComponent());
if (UserManager.isDeviceInDemoMode(mContext)) {
intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
}
if (action.equals(DeviceAdminReceiver.ACTION_PASSWORD_EXPIRING)) {
intent.putExtra("expiration", admin.passwordExpirationDate);
}
if (inForeground) {
intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
}
if (adminExtras != null) {
intent.putExtras(adminExtras);
}
if (mInjector.getPackageManager().queryBroadcastReceiversAsUser(
intent,
PackageManager.MATCH_DEBUG_TRIAGED_MISSING,
admin.getUserHandle()).isEmpty()) {
return false;
}
final BroadcastOptions options = BroadcastOptions.makeBasic();
options.setBackgroundActivityStartsAllowed(true);
if (result != null) {
mContext.sendOrderedBroadcastAsUser(intent, admin.getUserHandle(),
null, AppOpsManager.OP_NONE, options.toBundle(),
result, mHandler, Activity.RESULT_OK, null, null);
} else {
mContext.sendBroadcastAsUser(intent, admin.getUserHandle(), null, options.toBundle());
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendAdminCommandLocked
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2023-21284
|
MEDIUM
| 5.5
|
android
|
sendAdminCommandLocked
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public static Node.Mode[] getNodeModes() {
return Node.Mode.values();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getNodeModes
File: core/src/main/java/hudson/Functions.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-310"
] |
CVE-2014-2061
|
MEDIUM
| 5
|
jenkinsci/jenkins
|
getNodeModes
|
core/src/main/java/hudson/Functions.java
|
bf539198564a1108b7b71a973bf7de963a6213ef
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setSecureSetting(ComponentName who, String setting, String value) {
Objects.requireNonNull(who, "ComponentName is null");
final CallerIdentity caller = getCallerIdentity(who);
Preconditions.checkCallAuthorization(
isProfileOwner(caller) || isDefaultDeviceOwner(caller));
int callingUserId = caller.getUserId();
synchronized (getLockObject()) {
if (isDeviceOwner(who, callingUserId)) {
if (!SECURE_SETTINGS_DEVICEOWNER_ALLOWLIST.contains(setting)
&& !isCurrentUserDemo()) {
throw new SecurityException(String.format(
"Permission denial: Device owners cannot update %1$s", setting));
}
} else if (!SECURE_SETTINGS_ALLOWLIST.contains(setting) && !isCurrentUserDemo()) {
throw new SecurityException(String.format(
"Permission denial: Profile owners cannot update %1$s", setting));
}
if (setting.equals(Settings.Secure.LOCATION_MODE)
&& isSetSecureSettingLocationModeCheckEnabled(who.getPackageName(),
callingUserId)) {
throw new UnsupportedOperationException(Settings.Secure.LOCATION_MODE + " is "
+ "deprecated. Please use setLocationEnabled() instead.");
}
if (setting.equals(Settings.Secure.INSTALL_NON_MARKET_APPS)) {
if (getTargetSdk(who.getPackageName(), callingUserId) >= Build.VERSION_CODES.O) {
throw new UnsupportedOperationException(Settings.Secure.INSTALL_NON_MARKET_APPS
+ " is deprecated. Please use one of the user restrictions "
+ UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES + " or "
+ UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES_GLOBALLY + " instead.");
}
if (!mUserManager.isManagedProfile(callingUserId)) {
Slogf.e(LOG_TAG, "Ignoring setSecureSetting request for "
+ setting + ". User restriction "
+ UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES + " or "
+ UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES_GLOBALLY
+ " should be used instead.");
} else {
try {
setUserRestriction(who, who.getPackageName(),
UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES,
(Integer.parseInt(value) == 0) ? true : false, /* parent */ false);
DevicePolicyEventLogger
.createEvent(DevicePolicyEnums.SET_SECURE_SETTING)
.setAdmin(who)
.setStrings(setting, value)
.write();
} catch (NumberFormatException exc) {
Slogf.e(LOG_TAG, "Invalid value: " + value + " for setting " + setting);
}
}
return;
}
mInjector.binderWithCleanCallingIdentity(() -> {
if (Settings.Secure.DEFAULT_INPUT_METHOD.equals(setting)) {
final String currentValue = mInjector.settingsSecureGetStringForUser(
Settings.Secure.DEFAULT_INPUT_METHOD, callingUserId);
if (!TextUtils.equals(currentValue, value)) {
// Tell the content observer that the next change will be due to the owner
// changing the value. There is a small race condition here that we cannot
// avoid: Change notifications are sent asynchronously, so it is possible
// that there are prior notifications queued up before the one we are about
// to trigger. This is a corner case that will have no impact in practice.
mSetupContentObserver.addPendingChangeByOwnerLocked(callingUserId);
}
getUserData(callingUserId).mCurrentInputMethodSet = true;
saveSettingsLocked(callingUserId);
}
mInjector.settingsSecurePutStringForUser(setting, value, callingUserId);
// Notify the user if it's the location mode setting that's been set, to any value
// other than 'off'.
if (setting.equals(Settings.Secure.LOCATION_MODE)
&& (Integer.parseInt(value) != 0)) {
showLocationSettingsEnabledNotification(UserHandle.of(callingUserId));
}
});
}
DevicePolicyEventLogger
.createEvent(DevicePolicyEnums.SET_SECURE_SETTING)
.setAdmin(who)
.setStrings(setting, value)
.write();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSecureSetting
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
setSecureSetting
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
private static int dumpProcessList(PrintWriter pw,
ActivityManagerService service, List list,
String prefix, String normalLabel, String persistentLabel,
String dumpPackage) {
int numPers = 0;
for (int i = list.size() - 1; i >= 0; i--) {
ProcessRecord r = (ProcessRecord) list.get(i);
if (dumpPackage != null && !dumpPackage.equals(r.info.packageName)) {
continue;
}
pw.println(String.format("%s%s #%2d: %s",
prefix, (r.isPersistent() ? persistentLabel : normalLabel),
i, r.toString()));
if (r.isPersistent()) {
numPers++;
}
}
return numPers;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dumpProcessList
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21292
|
MEDIUM
| 5.5
|
android
|
dumpProcessList
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isUsbDataSignalingEnabledInternalLocked() {
// TODO(b/261999445): remove
ActiveAdmin admin;
if (isHeadlessFlagEnabled()) {
admin = getDeviceOwnerOrProfileOwnerOfOrganizationOwnedDeviceLocked();
} else {
admin = getDeviceOwnerOrProfileOwnerOfOrganizationOwnedDeviceLocked(
UserHandle.USER_SYSTEM);
}
return admin == null || admin.mUsbDataSignalingEnabled;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isUsbDataSignalingEnabledInternalLocked
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
isUsbDataSignalingEnabledInternalLocked
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
@NonNull
public Account[] getAccountsByTypeForPackage(String type, String packageName,
String opPackageName) {
int callingUid = Binder.getCallingUid();
int userId = UserHandle.getCallingUserId();
mAppOpsManager.checkPackage(callingUid, opPackageName);
int packageUid = -1;
try {
packageUid = mPackageManager.getPackageUidAsUser(packageName, userId);
} catch (NameNotFoundException re) {
Slog.e(TAG, "Couldn't determine the packageUid for " + packageName + re);
return EMPTY_ACCOUNT_ARRAY;
}
if (!UserHandle.isSameApp(callingUid, Process.SYSTEM_UID)
&& (type != null && !isAccountManagedByCaller(type, callingUid, userId))) {
return EMPTY_ACCOUNT_ARRAY;
}
if (!UserHandle.isSameApp(callingUid, Process.SYSTEM_UID) && type == null) {
return getAccountsAsUserForPackage(type, userId,
packageName, packageUid, opPackageName, false /* includeUserManagedNotVisible */);
}
return getAccountsAsUserForPackage(type, userId,
packageName, packageUid, opPackageName, true /* includeUserManagedNotVisible */);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAccountsByTypeForPackage
File: services/core/java/com/android/server/accounts/AccountManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-502"
] |
CVE-2023-45777
|
HIGH
| 7.8
|
android
|
getAccountsByTypeForPackage
|
services/core/java/com/android/server/accounts/AccountManagerService.java
|
f810d81839af38ee121c446105ca67cb12992fc6
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void executeDeleteWikiStatement(Statement statement, DatabaseProduct databaseProduct,
String escapedSchemaName) throws SQLException
{
if (DatabaseProduct.ORACLE == databaseProduct) {
statement.execute("DROP USER " + escapedSchemaName + " CASCADE");
} else if (DatabaseProduct.DERBY == databaseProduct || DatabaseProduct.MYSQL == databaseProduct
|| DatabaseProduct.H2 == databaseProduct) {
statement.execute("DROP SCHEMA " + escapedSchemaName);
} else if (DatabaseProduct.HSQLDB == databaseProduct) {
statement.execute("DROP SCHEMA " + escapedSchemaName + " CASCADE");
} else if (DatabaseProduct.DB2 == databaseProduct) {
statement.execute("DROP SCHEMA " + escapedSchemaName + " RESTRICT");
} else if (DatabaseProduct.POSTGRESQL == databaseProduct) {
if (isInSchemaMode()) {
statement.execute("DROP SCHEMA " + escapedSchemaName + " CASCADE");
} else {
this.logger.warn("Subwiki deletion not yet supported in Database mode for PostgreSQL");
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: executeDeleteWikiStatement
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-459"
] |
CVE-2023-36468
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
executeDeleteWikiStatement
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java
|
15a6f845d8206b0ae97f37aa092ca43d4f9d6e59
| 0
|
Analyze the following code function for security vulnerabilities
|
protected Unmarshaller createUnmarshaller() {
try {
Unmarshaller unmarshaller = getJaxbContext().createUnmarshaller();
initJaxbUnmarshaller(unmarshaller);
return unmarshaller;
}
catch (JAXBException ex) {
throw convertJaxbException(ex);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createUnmarshaller
File: spring-oxm/src/main/java/org/springframework/oxm/jaxb/Jaxb2Marshaller.java
Repository: spring-projects/spring-framework
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2013-4152
|
MEDIUM
| 6.8
|
spring-projects/spring-framework
|
createUnmarshaller
|
spring-oxm/src/main/java/org/springframework/oxm/jaxb/Jaxb2Marshaller.java
|
2843b7d2ee12e3f9c458f6f816befd21b402e3b9
| 0
|
Analyze the following code function for security vulnerabilities
|
public static CmsImageScaler getDownScaler(CmsObject cms, String rootPath) {
if (m_downScaler == null) {
// downscaling is not configured at all
return null;
}
// try to read the image.size property from the parent folder
String parentFolder = CmsResource.getParentFolder(rootPath);
parentFolder = cms.getRequestContext().removeSiteRoot(parentFolder);
try {
CmsProperty fileSizeProperty = cms.readPropertyObject(
parentFolder,
CmsPropertyDefinition.PROPERTY_IMAGE_SIZE,
true);
if (!fileSizeProperty.isNullProperty()) {
// image.size property has been set
String value = fileSizeProperty.getValue().trim();
if (CmsStringUtil.isNotEmpty(value)) {
if (PROPERTY_VALUE_UNLIMITED.equals(value)) {
// in this case no downscaling must be done
return null;
} else {
CmsImageScaler scaler = new CmsImageScaler(value);
if (scaler.isValid()) {
// special folder based scaler settings have been set
return scaler;
}
}
}
}
} catch (CmsException e) {
// ignore, continue with given downScaler
}
return (CmsImageScaler)m_downScaler.clone();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDownScaler
File: src/org/opencms/file/types/CmsResourceTypeImage.java
Repository: alkacon/opencms-core
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-3312
|
MEDIUM
| 4
|
alkacon/opencms-core
|
getDownScaler
|
src/org/opencms/file/types/CmsResourceTypeImage.java
|
92e035423aa6967822d343e54392d4291648c0ee
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isDeviceOwnerUserId(int userId) {
synchronized (getLockObject()) {
return mOwners.getDeviceOwnerComponent() != null
&& mOwners.getDeviceOwnerUserId() == userId;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isDeviceOwnerUserId
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2023-21284
|
MEDIUM
| 5.5
|
android
|
isDeviceOwnerUserId
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String normalizedArch() {
return NORMALIZED_ARCH;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: normalizedArch
File: common/src/main/java/io/netty/util/internal/PlatformDependent.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-668",
"CWE-378",
"CWE-379"
] |
CVE-2022-24823
|
LOW
| 1.9
|
netty
|
normalizedArch
|
common/src/main/java/io/netty/util/internal/PlatformDependent.java
|
185f8b2756a36aaa4f973f1a2a025e7d981823f1
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onTrackedByNonUiService(String activeCallId, boolean isTracked,
Session.Info info) throws RemoteException { }
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onTrackedByNonUiService
File: tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21283
|
MEDIUM
| 5.5
|
android
|
onTrackedByNonUiService
|
tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java
|
9b41a963f352fdb3da1da8c633d45280badfcb24
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String render(XWikiContext context) throws XWikiException
{
return "login";
}
|
Vulnerability Classification:
- CWE: CWE-287
- CVE: CVE-2022-36092
- Severity: HIGH
- CVSS Score: 7.5
Description: XWIKI-19549: Disallow template override for login, register and skin
* Also do not put a document without view rights into the context.
Function: render
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/LoginErrorAction.java
Repository: xwiki/xwiki-platform
Fixed Code:
@Override
public String render(XWikiContext context) throws XWikiException
{
return LOGIN;
}
|
[
"CWE-287"
] |
CVE-2022-36092
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
render
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/LoginErrorAction.java
|
71a6d0bb6f8ab718fcfaae0e9b8c16c2d69cd4bb
| 1
|
Analyze the following code function for security vulnerabilities
|
boolean enableInternal() {
if (mState == NfcAdapter.STATE_ON) {
return true;
}
Log.i(TAG, "Enabling NFC");
updateState(NfcAdapter.STATE_TURNING_ON);
WatchDogThread watchDog = new WatchDogThread("enableInternal", INIT_WATCHDOG_MS);
watchDog.start();
try {
mRoutingWakeLock.acquire();
try {
if (!mDeviceHost.initialize()) {
Log.w(TAG, "Error enabling NFC");
updateState(NfcAdapter.STATE_OFF);
return false;
}
} finally {
mRoutingWakeLock.release();
}
} finally {
watchDog.cancel();
}
if (mIsHceCapable) {
// Generate the initial card emulation routing table
mCardEmulationManager.onNfcEnabled();
}
synchronized (NfcService.this) {
mObjectMap.clear();
mP2pLinkManager.enableDisable(mIsNdefPushEnabled, true);
updateState(NfcAdapter.STATE_ON);
}
initSoundPool();
/* Start polling loop */
applyRouting(true);
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: enableInternal
File: src/com/android/nfc/NfcService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3761
|
LOW
| 2.1
|
android
|
enableInternal
|
src/com/android/nfc/NfcService.java
|
9ea802b5456a36f1115549b645b65c791eff3c2c
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isDatabaseIntegrityOk() {
acquireReference();
try {
List<Pair<String, String>> attachedDbs = null;
try {
attachedDbs = getAttachedDbs();
if (attachedDbs == null) {
throw new IllegalStateException("databaselist for: " + getPath() + " couldn't " +
"be retrieved. probably because the database is closed");
}
} catch (SQLiteException e) {
// can't get attachedDb list. do integrity check on the main database
attachedDbs = new ArrayList<Pair<String, String>>();
attachedDbs.add(new Pair<String, String>("main", getPath()));
}
for (int i = 0; i < attachedDbs.size(); i++) {
Pair<String, String> p = attachedDbs.get(i);
SQLiteStatement prog = null;
try {
prog = compileStatement("PRAGMA " + p.first + ".integrity_check(1);");
String rslt = prog.simpleQueryForString();
if (!rslt.equalsIgnoreCase("ok")) {
// integrity_checker failed on main or attached databases
Log.e(TAG, "PRAGMA integrity_check on " + p.second + " returned: " + rslt);
return false;
}
} finally {
if (prog != null) prog.close();
}
}
} finally {
releaseReference();
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isDatabaseIntegrityOk
File: core/java/android/database/sqlite/SQLiteDatabase.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2018-9493
|
LOW
| 2.1
|
android
|
isDatabaseIntegrityOk
|
core/java/android/database/sqlite/SQLiteDatabase.java
|
ebc250d16c747f4161167b5ff58b3aea88b37acf
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void moveRootTaskToDisplay(int taskId, int displayId) {
mAmInternal.enforceCallingPermission(INTERNAL_SYSTEM_WINDOW, "moveRootTaskToDisplay()");
synchronized (mGlobalLock) {
final long ident = Binder.clearCallingIdentity();
try {
ProtoLog.d(WM_DEBUG_TASKS, "moveRootTaskToDisplay: moving taskId=%d to "
+ "displayId=%d", taskId, displayId);
mRootWindowContainer.moveRootTaskToDisplay(taskId, displayId, ON_TOP);
} finally {
Binder.restoreCallingIdentity(ident);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: moveRootTaskToDisplay
File: services/core/java/com/android/server/wm/ActivityTaskManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40094
|
HIGH
| 7.8
|
android
|
moveRootTaskToDisplay
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
public Locale getLocale()
{
return this.deletedDoc.getLocale();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLocale
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/DeletedDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2023-29208
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
getLocale
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/DeletedDocument.java
|
d9e947559077e947315bf700c5703dfc7dd8a8d7
| 0
|
Analyze the following code function for security vulnerabilities
|
public String resolveDriverClassNameFromRemote(String driverFileUrl) {
DriverResult driverResult = tempLoadFromRemote(driverFileUrl);
File driverFile = driverResult.getDriverFile();
String className = resolveDriverClassName(driverFile);
try {
Files.deleteIfExists(driverFile.toPath());
} catch (IOException e) {
log.error("delete driver error from " + driverResult.getDriverFilePath(), e);
}
return className;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: resolveDriverClassNameFromRemote
File: core/src/main/java/com/databasir/core/infrastructure/driver/DriverResources.java
Repository: vran-dev/databasir
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2022-31196
|
HIGH
| 7.5
|
vran-dev/databasir
|
resolveDriverClassNameFromRemote
|
core/src/main/java/com/databasir/core/infrastructure/driver/DriverResources.java
|
226c20e0c9124037671a91d6b3e5083bd2462058
| 0
|
Analyze the following code function for security vulnerabilities
|
public static List<PatientIdentifierType> getPatientIdentifierTypes() {
return Context.getPatientService().getAllPatientIdentifierTypes();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPatientIdentifierTypes
File: api/src/main/java/org/openmrs/module/htmlformentry/HtmlFormEntryUtil.java
Repository: openmrs/openmrs-module-htmlformentry
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-16521
|
HIGH
| 7.5
|
openmrs/openmrs-module-htmlformentry
|
getPatientIdentifierTypes
|
api/src/main/java/org/openmrs/module/htmlformentry/HtmlFormEntryUtil.java
|
9dcd304688e65c31cac5532fe501b9816ed975ae
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void swapContentViewCore(ContentViewCore newContentViewCore,
boolean deleteOldNativeWebContents, boolean didStartLoad, boolean didFinishLoad) {
int originalWidth = 0;
int originalHeight = 0;
if (mContentViewCore != null) {
originalWidth = mContentViewCore.getViewportWidthPix();
originalHeight = mContentViewCore.getViewportHeightPix();
mContentViewCore.onHide();
}
destroyContentViewCore(deleteOldNativeWebContents);
NativePage previousNativePage = mNativePage;
mNativePage = null;
setContentViewCore(newContentViewCore);
// Size of the new ContentViewCore is zero at this point. If we don't call onSizeChanged(),
// next onShow() call would send a resize message with the current ContentViewCore size
// (zero) to the renderer process, although the new size will be set soon.
// However, this size fluttering may confuse Blink and rendered result can be broken
// (see http://crbug.com/340987).
mContentViewCore.onSizeChanged(originalWidth, originalHeight, 0, 0);
mContentViewCore.onShow();
mContentViewCore.attachImeAdapter();
for (TabObserver observer : mObservers) observer.onContentChanged(this);
destroyNativePageInternal(previousNativePage);
for (TabObserver observer : mObservers) {
observer.onWebContentsSwapped(this, didStartLoad, didFinishLoad);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: swapContentViewCore
File: chrome/android/java/src/org/chromium/chrome/browser/Tab.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
swapContentViewCore
|
chrome/android/java/src/org/chromium/chrome/browser/Tab.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public SaServletFilter setError(SaFilterErrorStrategy error) {
this.error = error;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setError
File: sa-token-starter/sa-token-spring-boot-starter/src/main/java/cn/dev33/satoken/filter/SaServletFilter.java
Repository: dromara/Sa-Token
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-44794
|
CRITICAL
| 9.8
|
dromara/Sa-Token
|
setError
|
sa-token-starter/sa-token-spring-boot-starter/src/main/java/cn/dev33/satoken/filter/SaServletFilter.java
|
954efeb73277f924f836da2a25322ea35ee1bfa3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isAppForeground(int uid) {
return ActivityManagerService.this.isAppForeground(uid);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isAppForeground
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21292
|
MEDIUM
| 5.5
|
android
|
isAppForeground
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
private Object readNonPrimitiveContent(boolean unshared)
throws ClassNotFoundException, IOException {
checkReadPrimitiveTypes();
if (primitiveData.available() > 0) {
OptionalDataException e = new OptionalDataException();
e.length = primitiveData.available();
throw e;
}
do {
byte tc = nextTC();
switch (tc) {
case TC_CLASS:
return readNewClass(unshared);
case TC_CLASSDESC:
return readNewClassDesc(unshared);
case TC_ARRAY:
return readNewArray(unshared);
case TC_OBJECT:
return readNewObject(unshared);
case TC_STRING:
return readNewString(unshared);
case TC_LONGSTRING:
return readNewLongString(unshared);
case TC_ENUM:
return readEnum(unshared);
case TC_REFERENCE:
if (unshared) {
readNewHandle();
throw new InvalidObjectException("Unshared read of back reference");
}
return readCyclicReference();
case TC_NULL:
return null;
case TC_EXCEPTION:
Exception exc = readException();
throw new WriteAbortedException("Read an exception", exc);
case TC_RESET:
resetState();
break;
case TC_ENDBLOCKDATA: // Can occur reading class annotation
pushbackTC();
OptionalDataException e = new OptionalDataException();
e.eof = true;
throw e;
default:
throw corruptStream(tc);
}
// Only TC_RESET falls through
} while (true);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readNonPrimitiveContent
File: luni/src/main/java/java/io/ObjectInputStream.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2014-7911
|
HIGH
| 7.2
|
android
|
readNonPrimitiveContent
|
luni/src/main/java/java/io/ObjectInputStream.java
|
738c833d38d41f8f76eb7e77ab39add82b1ae1e2
| 0
|
Analyze the following code function for security vulnerabilities
|
@RequiresPermission(USE_FINGERPRINT)
public boolean isHardwareDetected() {
if (mService != null) {
try {
long deviceId = 0; /* TODO: plumb hardware id to FPMS */
return mService.isHardwareDetected(deviceId, mContext.getOpPackageName());
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
} else {
Log.w(TAG, "isFingerprintHardwareDetected(): Service not connected!");
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isHardwareDetected
File: core/java/android/hardware/fingerprint/FingerprintManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3917
|
HIGH
| 7.2
|
android
|
isHardwareDetected
|
core/java/android/hardware/fingerprint/FingerprintManager.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void moveToFront() {
checkCaller();
// Will bring task to front if it already has a root activity.
startActivityFromRecentsInner(mTaskId, null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: moveToFront
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-3833
|
MEDIUM
| 4.3
|
android
|
moveToFront
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
@SuppressWarnings("unchecked")
public static List<Structure> getStructures(String orderBy,int limit)
{
String direction = "asc";
return getStructures(orderBy,limit,direction);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getStructures
File: src/com/dotmarketing/portlets/structure/factories/StructureFactory.java
Repository: dotCMS/core
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-2355
|
HIGH
| 7.5
|
dotCMS/core
|
getStructures
|
src/com/dotmarketing/portlets/structure/factories/StructureFactory.java
|
897f3632d7e471b7a73aabed5b19f6f53d4e5562
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
boolean applyAnimation(LayoutParams lp, @TransitionOldType int transit, boolean enter,
boolean isVoiceInteraction, @Nullable ArrayList<WindowContainer> sources) {
if (mUseTransferredAnimation) {
return false;
}
// If it was set to true, reset the last request to force the transition.
mRequestForceTransition = false;
return super.applyAnimation(lp, transit, enter, isVoiceInteraction, sources);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: applyAnimation
File: services/core/java/com/android/server/wm/ActivityRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21145
|
HIGH
| 7.8
|
android
|
applyAnimation
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void populateMap(HierarchicalStreamReader reader, UnmarshallingContext context, Map map) {
populateMap(reader, context, map, map);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: populateMap
File: xstream/src/java/com/thoughtworks/xstream/converters/collections/MapConverter.java
Repository: x-stream/xstream
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2021-43859
|
MEDIUM
| 5
|
x-stream/xstream
|
populateMap
|
xstream/src/java/com/thoughtworks/xstream/converters/collections/MapConverter.java
|
e8e88621ba1c85ac3b8620337dd672e0c0c3a846
| 0
|
Analyze the following code function for security vulnerabilities
|
public void close() {
if (!partial)
return;
try {
tokens.close();
}
catch (IOException e) {
throw new ExceptionConverter(e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: close
File: java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
Repository: pdftk-java/pdftk
The code follows secure coding practices.
|
[
"CWE-835"
] |
CVE-2021-37819
|
HIGH
| 7.5
|
pdftk-java/pdftk
|
close
|
java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
|
9b0cbb76c8434a8505f02ada02a94263dcae9247
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setContent(File file) throws IOException {
long size = file.length();
checkSize(size);
this.size = size;
if (this.file != null) {
delete();
}
this.file = file;
isRenamed = true;
setCompleted();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setContent
File: codec-http/src/main/java/io/netty/handler/codec/http/multipart/AbstractDiskHttpData.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-378",
"CWE-379"
] |
CVE-2021-21290
|
LOW
| 1.9
|
netty
|
setContent
|
codec-http/src/main/java/io/netty/handler/codec/http/multipart/AbstractDiskHttpData.java
|
c735357bf29d07856ad171c6611a2e1a0e0000ec
| 0
|
Analyze the following code function for security vulnerabilities
|
public Date getInvalidityDate() {
return invalidityDate;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getInvalidityDate
File: base/common/src/main/java/com/netscape/certsrv/cert/CertRevokeRequest.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
getInvalidityDate
|
base/common/src/main/java/com/netscape/certsrv/cert/CertRevokeRequest.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
protected XWikiDocument prepareEditedDocument(XWikiContext context) throws XWikiException
{
// Determine the edited document (translation).
XWikiDocument editedDocument = getEditedDocument(context);
EditForm editForm = (EditForm) context.getForm();
// Update the edited document based on the template specified on the request.
readFromTemplate(editedDocument, editForm.getTemplate(), context);
// The default values from the template can be overwritten by additional request parameters.
updateDocumentTitleAndContentFromRequest(editedDocument, context);
editedDocument.readAddedUpdatedAndRemovedObjectsFromForm(editForm, context);
// If the metadata is modified, modify the effective metadata author
if (editedDocument.isMetaDataDirty()) {
UserReference userReference =
this.documentReferenceUserReferenceResolver.resolve(context.getUserReference());
editedDocument.getAuthors().setEffectiveMetadataAuthor(userReference);
editedDocument.getAuthors().setOriginalMetadataAuthor(userReference);
}
// If the content is modified, modify the content author
if (editedDocument.isContentDirty()) {
UserReference userReference =
this.documentReferenceUserReferenceResolver.resolve(context.getUserReference());
editedDocument.getAuthors().setContentAuthor(userReference);
}
// Set the current user as creator, author and contentAuthor when the edited document is newly created to avoid
// using XWikiGuest instead (because those fields were not previously initialized).
if (editedDocument.isNew()) {
editedDocument.setCreatorReference(context.getUserReference());
editedDocument.setAuthorReference(context.getUserReference());
editedDocument.setContentAuthorReference(context.getUserReference());
}
editedDocument.readTemporaryUploadedFiles(editForm);
// Expose the edited document on the XWiki context and the Velocity context.
putDocumentOnContext(editedDocument, context);
return editedDocument;
}
|
Vulnerability Classification:
- CWE: CWE-352
- CVE: CVE-2023-46242
- Severity: HIGH
- CVSS Score: 8.8
Description: XWIKI-20386: CSRF privilege escalation/RCE via the edit action
Function: prepareEditedDocument
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/EditAction.java
Repository: xwiki/xwiki-platform
Fixed Code:
protected XWikiDocument prepareEditedDocument(XWikiContext context) throws XWikiException
{
// Determine the edited document (translation).
XWikiDocument editedDocument = getEditedDocument(context);
EditForm editForm = (EditForm) context.getForm();
// Update the edited document based on the template specified on the request.
readFromTemplate(editedDocument, editForm.getTemplate(), context);
// The default values from the template can be overwritten by additional request parameters.
updateDocumentTitleAndContentFromRequest(editedDocument, context);
editedDocument.readAddedUpdatedAndRemovedObjectsFromForm(editForm, context);
// Check if the document in modified
if (editedDocument.isMetaDataDirty() || editedDocument.isContentDirty()) {
// If the document is modified make sure a valid CSRF is provided
String token = context.getRequest().getParameter("form_token");
if (!this.csrf.isTokenValid(token)) {
// or make the document restricted
editedDocument.setRestricted(true);
}
// If the metadata is modified, modify the effective metadata author
if (editedDocument.isMetaDataDirty()) {
UserReference userReference =
this.documentReferenceUserReferenceResolver.resolve(context.getUserReference());
editedDocument.getAuthors().setEffectiveMetadataAuthor(userReference);
editedDocument.getAuthors().setOriginalMetadataAuthor(userReference);
}
// If the content is modified, modify the content author
if (editedDocument.isContentDirty()) {
UserReference userReference =
this.documentReferenceUserReferenceResolver.resolve(context.getUserReference());
editedDocument.getAuthors().setContentAuthor(userReference);
}
}
// Set the current user as creator, author and contentAuthor when the edited document is newly created to avoid
// using XWikiGuest instead (because those fields were not previously initialized).
if (editedDocument.isNew()) {
editedDocument.setCreatorReference(context.getUserReference());
editedDocument.setAuthorReference(context.getUserReference());
editedDocument.setContentAuthorReference(context.getUserReference());
}
editedDocument.readTemporaryUploadedFiles(editForm);
// Expose the edited document on the XWiki context and the Velocity context.
putDocumentOnContext(editedDocument, context);
return editedDocument;
}
|
[
"CWE-352"
] |
CVE-2023-46242
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
prepareEditedDocument
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/EditAction.java
|
cf8eb861998ea423c3645d2e5e974420b0e882be
| 1
|
Analyze the following code function for security vulnerabilities
|
public static List<File> getJars(Path folder) {
List<File> bucket = new ArrayList<>();
getJars(bucket, folder);
return bucket;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getJars
File: pf4j/src/main/java/org/pf4j/util/FileUtils.java
Repository: pf4j
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2023-40827
|
HIGH
| 7.5
|
pf4j
|
getJars
|
pf4j/src/main/java/org/pf4j/util/FileUtils.java
|
ed9392069fe14c6c30d9f876710e5ad40f7ea8c1
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean executeValidationScript(XWikiContext context, String validationScript)
{
try {
ContextualAuthorizationManager authorization = Utils.getComponent(ContextualAuthorizationManager.class);
DocumentReference validationScriptReference =
getCurrentDocumentReferenceResolver().resolve(validationScript, getDocumentReference());
// Make sure target document is allowed to execute Groovy
// TODO: this check should probably be right in XWiki#parseGroovyFromPage
authorization.checkAccess(Right.PROGRAM, validationScriptReference);
XWikiValidationInterface validObject =
(XWikiValidationInterface) context.getWiki().parseGroovyFromPage(validationScript, context);
return validObject.validateDocument(this, context);
} catch (Throwable e) {
XWikiValidationStatus.addExceptionToContext(getFullName(), "", e, context);
return false;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: executeValidationScript
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-26470
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
executeValidationScript
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
public void onInterrupt() {
Message message = mCaller.obtainMessage(DO_ON_INTERRUPT);
mCaller.sendMessage(message);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onInterrupt
File: core/java/android/accessibilityservice/AccessibilityService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3923
|
MEDIUM
| 4.3
|
android
|
onInterrupt
|
core/java/android/accessibilityservice/AccessibilityService.java
|
5f256310187b4ff2f13a7abb9afed9126facd7bc
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean jsFunction_hasSubscribePermission(Context cx, Scriptable thisObj, Object[] args, Function funObj)
throws ScriptException {
APIConsumer consumer = getAPIConsumer(thisObj);
if (consumer instanceof UserAwareAPIConsumer) {
try {
((UserAwareAPIConsumer) consumer).checkSubscribePermission();
return true;
} catch (APIManagementException e) {
return false;
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: jsFunction_hasSubscribePermission
File: components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java
Repository: wso2/carbon-apimgt
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2018-20736
|
LOW
| 3.5
|
wso2/carbon-apimgt
|
jsFunction_hasSubscribePermission
|
components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java
|
490f2860822f89d745b7c04fa9570bd86bef4236
| 0
|
Analyze the following code function for security vulnerabilities
|
public DiagramDescription getDescription() {
return new DiagramDescription("(Version)");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDescription
File: src/net/sourceforge/plantuml/version/PSystemVersion.java
Repository: plantuml
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2023-3431
|
MEDIUM
| 5.3
|
plantuml
|
getDescription
|
src/net/sourceforge/plantuml/version/PSystemVersion.java
|
fbe7fa3b25b4c887d83927cffb1009ec6cb8ab1e
| 0
|
Analyze the following code function for security vulnerabilities
|
private String getKeyguardOrLockScreenString() {
if (mQs != null && mQs.isCustomizing()) {
return getContext().getString(R.string.accessibility_desc_quick_settings_edit);
} else if (mStatusBarState == StatusBarState.KEYGUARD) {
return getContext().getString(R.string.accessibility_desc_lock_screen);
} else {
return getContext().getString(R.string.accessibility_desc_notification_shade);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getKeyguardOrLockScreenString
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2017-0822
|
HIGH
| 7.5
|
android
|
getKeyguardOrLockScreenString
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
void init() {
shutdownDone.init();
shutdownTimestamp = null;
if (unacknowledgedStanzas != null) {
// It's possible that there are new stanzas in the writer queue that
// came in while we were disconnected but resumable, drain those into
// the unacknowledged queue so that they get resent now
drainWriterQueueToUnacknowledgedStanzas();
}
queue.start();
Async.go(new Runnable() {
@Override
public void run() {
writePackets();
}
}, "Smack Packet Writer (" + getConnectionCounter() + ")");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: init
File: smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java
Repository: igniterealtime/Smack
The code follows secure coding practices.
|
[
"CWE-362"
] |
CVE-2016-10027
|
MEDIUM
| 4.3
|
igniterealtime/Smack
|
init
|
smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java
|
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
| 0
|
Analyze the following code function for security vulnerabilities
|
private void removeDexFiles(List<String> allCodePaths, String[] instructionSets) {
if (!allCodePaths.isEmpty()) {
if (instructionSets == null) {
throw new IllegalStateException("instructionSet == null");
}
String[] dexCodeInstructionSets = getDexCodeInstructionSets(instructionSets);
for (String codePath : allCodePaths) {
for (String dexCodeInstructionSet : dexCodeInstructionSets) {
int retCode = mInstaller.rmdex(codePath, dexCodeInstructionSet);
if (retCode < 0) {
Slog.w(TAG, "Couldn't remove dex file for package: "
+ " at location " + codePath + ", retcode=" + retCode);
// we don't consider this to be a failure of the core package deletion
}
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeDexFiles
File: services/core/java/com/android/server/pm/PackageManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-119"
] |
CVE-2016-2497
|
HIGH
| 7.5
|
android
|
removeDexFiles
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
@ApiOperation(value = "delete link Operation")
@RequestMapping(value = "/deleteLink", method = RequestMethod.POST)
public String deleteLink(@RequestParam(value = "userId", required = true) String userId,
@RequestParam(value = "cid", required = false) String cid,
@RequestParam(value = "solutionId", required = false) String solutionId,
@RequestParam(value = "version", required = false) String version,
@RequestParam(value = "linkId", required = true) String linkId) {
logger.debug(EELFLoggerDelegator.debugLogger, " deleteLink() in SolutionController begins -");
String result = "";
String resultTemplate = "{\"success\":\"%s\", \"errorMessage\":\"%s\"}";
if (null == userId && null == linkId) {
result = String.format(resultTemplate, false, "Mandatory feild(s) missing");
} else {
try {
boolean deletedLink = solutionService.deleteLink(userId, solutionId, version, cid, linkId);
if (deletedLink) {
result = String.format(resultTemplate, true, "");
} else {
result = String.format(resultTemplate, false, "Invalid Link Id – not found");
}
} catch (Exception e) {
logger.error(EELFLoggerDelegator.errorLogger,
" Exception in deleteLink() in SolutionController ", e);
}
}
logger.debug(EELFLoggerDelegator.debugLogger, " deleteLink() in SolutionController Ends ");
return result;
}
|
Vulnerability Classification:
- CWE: CWE-79
- CVE: CVE-2018-25097
- Severity: MEDIUM
- CVSS Score: 4.0
Description: Senitization for CSS Vulnerability
Issue-Id : ACUMOS-1650
Description : Senitization for CSS Vulnerability - Design Studio
Change-Id: If8fd4b9b06f884219d93881f7922421870de8e3d
Signed-off-by: Ramanaiah Pirla <RP00490596@techmahindra.com>
Function: deleteLink
File: ds-compositionengine/src/main/java/org/acumos/designstudio/ce/controller/SolutionController.java
Repository: acumos/design-studio
Fixed Code:
@ApiOperation(value = "delete link Operation")
@RequestMapping(value = "/deleteLink", method = RequestMethod.POST)
public String deleteLink(@RequestParam(value = "userId", required = true) String userId,
@RequestParam(value = "cid", required = false) String cid,
@RequestParam(value = "solutionId", required = false) String solutionId,
@RequestParam(value = "version", required = false) String version,
@RequestParam(value = "linkId", required = true) String linkId) {
logger.debug(EELFLoggerDelegator.debugLogger, " deleteLink() in SolutionController begins -");
String result = "";
String resultTemplate = "{\"success\":\"%s\", \"errorMessage\":\"%s\"}";
if (null == userId && null == linkId) {
result = String.format(resultTemplate, false, "Mandatory feild(s) missing");
} else {
try {
boolean deletedLink = solutionService.deleteLink(userId, SanitizeUtils.sanitize(solutionId), version, cid, linkId);
if (deletedLink) {
result = String.format(resultTemplate, true, "");
} else {
result = String.format(resultTemplate, false, "Invalid Link Id – not found");
}
} catch (Exception e) {
logger.error(EELFLoggerDelegator.errorLogger,
" Exception in deleteLink() in SolutionController ", e);
}
}
logger.debug(EELFLoggerDelegator.debugLogger, " deleteLink() in SolutionController Ends ");
return result;
}
|
[
"CWE-79"
] |
CVE-2018-25097
|
MEDIUM
| 4
|
acumos/design-studio
|
deleteLink
|
ds-compositionengine/src/main/java/org/acumos/designstudio/ce/controller/SolutionController.java
|
0df8a5e8722188744973168648e4c74c69ce67fd
| 1
|
Analyze the following code function for security vulnerabilities
|
protected void unlockSession(WrappedSession wrappedSession) {
assert getSessionLock(wrappedSession) != null;
assert ((ReentrantLock) getSessionLock(wrappedSession))
.isHeldByCurrentThread() : "Trying to unlock the session but it has not been locked by this thread";
getSessionLock(wrappedSession).unlock();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: unlockSession
File: flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-203"
] |
CVE-2021-31404
|
LOW
| 1.9
|
vaadin/flow
|
unlockSession
|
flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
|
621ef1b322737d963bee624b2d2e38cd739903d9
| 0
|
Analyze the following code function for security vulnerabilities
|
private EntityReferenceResolver<String> getCurrentMixedEntityReferenceResolver()
{
if (this.currentMixedEntityReferenceResolver == null) {
this.currentMixedEntityReferenceResolver =
Utils.getComponent(EntityReferenceResolver.TYPE_STRING, "currentmixed");
}
return this.currentMixedEntityReferenceResolver;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCurrentMixedEntityReferenceResolver
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-32620
|
MEDIUM
| 4
|
xwiki/xwiki-platform
|
getCurrentMixedEntityReferenceResolver
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean matches(ConditionContext context) {
BeanContext beanContext = context.getBeanContext();
if (beanContext instanceof ApplicationContext) {
List<String> paths = ((ApplicationContext) beanContext)
.getEnvironment()
.getProperty(FileWatchConfiguration.PATHS, Argument.listOf(String.class))
.orElse(null);
if (CollectionUtils.isNotEmpty(paths)) {
boolean matchedPaths = paths.stream().anyMatch(p -> new File(p).exists());
if (!matchedPaths) {
context.fail("File watch disabled because no paths matching the watch pattern exist (Paths: " + paths + ")");
}
return matchedPaths;
}
}
context.fail("File watch disabled because no watch paths specified");
return false;
}
|
Vulnerability Classification:
- CWE: CWE-400
- CVE: CVE-2022-21700
- Severity: MEDIUM
- CVSS Score: 5.0
Description: Use ConversionContext constants where possible instead of class (#2356)
Changes
-------
* Added ArgumentConversionContext constants in ConversionContext
* Replaced Argument.of and use of argument classes with
ConversionContext constants where possible
* Added getFirst method in ConvertibleMultiValues that accepts
ArgumentConversionContent parameter
Partially addresses issue #2355
Function: matches
File: runtime/src/main/java/io/micronaut/scheduling/io/watch/FileWatchCondition.java
Repository: micronaut-projects/micronaut-core
Fixed Code:
@Override
public boolean matches(ConditionContext context) {
BeanContext beanContext = context.getBeanContext();
if (beanContext instanceof ApplicationContext) {
List<String> paths = ((ApplicationContext) beanContext)
.getEnvironment()
.getProperty(FileWatchConfiguration.PATHS, ConversionContext.LIST_OF_STRING)
.orElse(null);
if (CollectionUtils.isNotEmpty(paths)) {
boolean matchedPaths = paths.stream().anyMatch(p -> new File(p).exists());
if (!matchedPaths) {
context.fail("File watch disabled because no paths matching the watch pattern exist (Paths: " + paths + ")");
}
return matchedPaths;
}
}
context.fail("File watch disabled because no watch paths specified");
return false;
}
|
[
"CWE-400"
] |
CVE-2022-21700
|
MEDIUM
| 5
|
micronaut-projects/micronaut-core
|
matches
|
runtime/src/main/java/io/micronaut/scheduling/io/watch/FileWatchCondition.java
|
b8ec32c311689667c69ae7d9f9c3b3a8abc96fe3
| 1
|
Analyze the following code function for security vulnerabilities
|
public synchronized Method getMethod() {
return this.method;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMethod
File: src/main/java/com/rabbitmq/client/impl/CommandAssembler.java
Repository: rabbitmq/rabbitmq-java-client
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-46120
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-java-client
|
getMethod
|
src/main/java/com/rabbitmq/client/impl/CommandAssembler.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getExecutable()
{
if ( Os.isFamily( Os.FAMILY_WINDOWS ) )
{
return super.getExecutable();
}
return unifyQuotes( super.getExecutable());
}
|
Vulnerability Classification:
- CWE: CWE-78
- CVE: CVE-2017-1000487
- Severity: HIGH
- CVSS Score: 7.5
Description: [PLXUTILS-161] Commandline shell injection problems
Patch by Charles Duffy, applied unmodified
Function: getExecutable
File: src/main/java/org/codehaus/plexus/util/cli/shell/BourneShell.java
Repository: codehaus-plexus/plexus-utils
Fixed Code:
public String getExecutable()
{
if ( Os.isFamily( Os.FAMILY_WINDOWS ) )
{
return super.getExecutable();
}
return quoteOneItem( super.getOriginalExecutable(), true );
}
|
[
"CWE-78"
] |
CVE-2017-1000487
|
HIGH
| 7.5
|
codehaus-plexus/plexus-utils
|
getExecutable
|
src/main/java/org/codehaus/plexus/util/cli/shell/BourneShell.java
|
b38a1b3a4352303e4312b2bb601a0d7ec6e28f41
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void setDigitPos(int position, byte value) {
assert position >= 0;
if (usingBytes) {
ensureCapacity(position + 1);
bcdBytes[position] = value;
} else if (position >= 16) {
switchStorage();
ensureCapacity(position + 1);
bcdBytes[position] = value;
} else {
int shift = position * 4;
bcdLong = bcdLong & ~(0xfL << shift) | ((long) value << shift);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setDigitPos
File: icu4j/main/classes/core/src/com/ibm/icu/impl/number/DecimalQuantity_DualStorageBCD.java
Repository: unicode-org/icu
The code follows secure coding practices.
|
[
"CWE-190"
] |
CVE-2018-18928
|
HIGH
| 7.5
|
unicode-org/icu
|
setDigitPos
|
icu4j/main/classes/core/src/com/ibm/icu/impl/number/DecimalQuantity_DualStorageBCD.java
|
53d8c8f3d181d87a6aa925b449b51c4a2c922a51
| 0
|
Analyze the following code function for security vulnerabilities
|
private final void dumpApplicationMemoryUsageHeader(PrintWriter pw, long uptime,
long realtime, boolean isCheckinRequest, boolean isCompact) {
if (isCompact) {
pw.print("version,"); pw.println(MEMINFO_COMPACT_VERSION);
}
if (isCheckinRequest || isCompact) {
// short checkin version
pw.print("time,"); pw.print(uptime); pw.print(","); pw.println(realtime);
} else {
pw.println("Applications Memory Usage (in Kilobytes):");
pw.println("Uptime: " + uptime + " Realtime: " + realtime);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dumpApplicationMemoryUsageHeader
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2018-9492
|
HIGH
| 7.2
|
android
|
dumpApplicationMemoryUsageHeader
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
@Exported
public int getSlaveAgentPort() {
return slaveAgentPort;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSlaveAgentPort
File: core/src/main/java/jenkins/model/Jenkins.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2014-2065
|
MEDIUM
| 4.3
|
jenkinsci/jenkins
|
getSlaveAgentPort
|
core/src/main/java/jenkins/model/Jenkins.java
|
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public JDOMFactory getFactory() {
return getJDOMFactory();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFactory
File: core/src/java/org/jdom2/input/SAXBuilder.java
Repository: hunterhacker/jdom
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-33813
|
MEDIUM
| 5
|
hunterhacker/jdom
|
getFactory
|
core/src/java/org/jdom2/input/SAXBuilder.java
|
bd3ab78370098491911d7fe9d7a43b97144a234e
| 0
|
Analyze the following code function for security vulnerabilities
|
private void switchStorage() {
if (usingBytes) {
// Change from bytes to long
bcdLong = 0L;
for (int i = precision - 1; i >= 0; i--) {
bcdLong <<= 4;
bcdLong |= bcdBytes[i];
}
bcdBytes = null;
usingBytes = false;
} else {
// Change from long to bytes
ensureCapacity();
for (int i = 0; i < precision; i++) {
bcdBytes[i] = (byte) (bcdLong & 0xf);
bcdLong >>>= 4;
}
assert usingBytes;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: switchStorage
File: icu4j/main/classes/core/src/com/ibm/icu/impl/number/DecimalQuantity_DualStorageBCD.java
Repository: unicode-org/icu
The code follows secure coding practices.
|
[
"CWE-190"
] |
CVE-2018-18928
|
HIGH
| 7.5
|
unicode-org/icu
|
switchStorage
|
icu4j/main/classes/core/src/com/ibm/icu/impl/number/DecimalQuantity_DualStorageBCD.java
|
53d8c8f3d181d87a6aa925b449b51c4a2c922a51
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getBasicDate() {
return formatDate(new Date());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getBasicDate
File: java/code/src/com/redhat/rhn/common/localization/LocalizationService.java
Repository: spacewalkproject/spacewalk
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2016-3079
|
MEDIUM
| 4.3
|
spacewalkproject/spacewalk
|
getBasicDate
|
java/code/src/com/redhat/rhn/common/localization/LocalizationService.java
|
7b9ff9ad
| 0
|
Analyze the following code function for security vulnerabilities
|
public void addSynchronously(MediaPackage mediaPackage) throws SearchException, MediaPackageException,
IllegalArgumentException, UnauthorizedException {
if (mediaPackage == null) {
throw new IllegalArgumentException("Unable to add a null mediapackage");
}
logger.debug("Attempting to add mediapackage {} to search index", mediaPackage.getIdentifier());
AccessControlList acl = authorizationService.getActiveAcl(mediaPackage).getA();
Date now = new Date();
try {
if (indexManager.add(mediaPackage, acl, now)) {
logger.info("Added mediapackage `{}` to the search index, using ACL `{}`", mediaPackage, acl);
} else {
logger.warn("Failed to add mediapackage {} to the search index", mediaPackage.getIdentifier());
}
} catch (SolrServerException e) {
throw new SearchException(e);
}
try {
persistence.storeMediaPackage(mediaPackage, acl, now);
} catch (SearchServiceDatabaseException e) {
logger.error("Could not store media package to search database {}: {}", mediaPackage.getIdentifier(), e);
throw new SearchException(e);
}
}
|
Vulnerability Classification:
- CWE: CWE-863
- CVE: CVE-2021-21318
- Severity: MEDIUM
- CVSS Score: 5.5
Description: Fix Engage Series Publication and Access
Access to series and series metadata on the search service (shown in
media module and player) depends on the events published which are part
of the series. Publishing an event will automatically publish a series
and update access to it. Removing an event or republishing the event
should do the same.
Incorrectly Hiding Public Series
--------------------------------
This patch fixes the access control update to the series when a new
episode is being published. Until now, a new episode publication would
always update the series access with the episode access.
While this is no security issue since it can only cause the access to be
stricter, it may cause public series to become private. This would
happen, for example, if a users sets one episode of a series to private
and republishes the episode.
Now, the search service will merge the access control lists of all
episodes to grant access based on their combined access rules.
Update Series on Removal
------------------------
This patch fixes Opencast not updating the series access or remove a
published series if an event is being removed.
This means that access to a series is re-calculated when an episode is
being deleted based on the remaining published episodes in the series.
For example, removing the last episode with public access will now make
the series private which it would have stayed public before.
It also means that if the last episode of a series is being removed, the
series itself will be unpublished as well, so no empty series will
continue to show up any longer.
Function: addSynchronously
File: modules/search-service-impl/src/main/java/org/opencastproject/search/impl/SearchServiceImpl.java
Repository: opencast
Fixed Code:
public void addSynchronously(MediaPackage mediaPackage)
throws SearchException, IllegalArgumentException, UnauthorizedException, NotFoundException,
SearchServiceDatabaseException {
if (mediaPackage == null) {
throw new IllegalArgumentException("Unable to add a null mediapackage");
}
final String mediaPackageId = mediaPackage.getIdentifier().toString();
logger.debug("Attempting to add media package {} to search index", mediaPackageId);
AccessControlList acl = authorizationService.getActiveAcl(mediaPackage).getA();
AccessControlList seriesAcl = persistence.getAccessControlLists(mediaPackage.getSeries(), mediaPackageId).stream()
.reduce(new AccessControlList(acl.getEntries()), AccessControlList::mergeActions);
logger.debug("Updating series with merged access control list: {}", seriesAcl);
Date now = new Date();
try {
if (indexManager.add(mediaPackage, acl, seriesAcl, now)) {
logger.info("Added media package `{}` to the search index, using ACL `{}`", mediaPackageId, acl);
} else {
logger.warn("Failed to add media package {} to the search index", mediaPackageId);
}
} catch (SolrServerException e) {
throw new SearchException(e);
}
try {
persistence.storeMediaPackage(mediaPackage, acl, now);
} catch (SearchServiceDatabaseException e) {
throw new SearchException(
String.format("Could not store media package to search database %s", mediaPackageId), e);
}
}
|
[
"CWE-863"
] |
CVE-2021-21318
|
MEDIUM
| 5.5
|
opencast
|
addSynchronously
|
modules/search-service-impl/src/main/java/org/opencastproject/search/impl/SearchServiceImpl.java
|
b18c6a7f81f08ed14884592a6c14c9ab611ad450
| 1
|
Analyze the following code function for security vulnerabilities
|
@VisibleForTesting
protected void addCcAddressesToList(List<Rfc822Token[]> addresses,
List<Rfc822Token[]> compareToList, RecipientEditTextView list) {
String address;
if (compareToList == null) {
for (final Rfc822Token[] tokens : addresses) {
for (final Rfc822Token token : tokens) {
address = token.toString();
list.append(address + END_TOKEN);
}
}
} else {
HashSet<String> compareTo = convertToHashSet(compareToList);
for (final Rfc822Token[] tokens : addresses) {
for (final Rfc822Token token : tokens) {
address = token.toString();
// Check if this is a duplicate:
if (!compareTo.contains(token.getAddress())) {
// Get the address here
list.append(address + END_TOKEN);
}
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addCcAddressesToList
File: src/com/android/mail/compose/ComposeActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2425
|
MEDIUM
| 4.3
|
android
|
addCcAddressesToList
|
src/com/android/mail/compose/ComposeActivity.java
|
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isVrModePackageEnabled(ComponentName packageName) {
enforceSystemHasVrFeature();
final VrManagerInternal vrService = LocalServices.getService(VrManagerInternal.class);
return vrService.hasVrPackage(packageName, UserHandle.getCallingUserId()) ==
VrManagerInternal.NO_ERROR;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isVrModePackageEnabled
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2018-9492
|
HIGH
| 7.2
|
android
|
isVrModePackageEnabled
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.